This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][SPARC] missing membar in niagara2_memcpy
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 18 May 2014 15:28:58 +0200
- Subject: Re: [PATCH][SPARC] missing membar in niagara2_memcpy
- Authentication-results: sourceware.org; auth=none
- References: <87k39n6mtn dot fsf at oracle dot com> <20140515 dot 125521 dot 925272462801829164 dot davem at davemloft dot net> <87y4y354ow dot fsf at oracle dot com> <20140517 dot 141819 dot 1630278205417215541 dot davem at davemloft dot net>
> Several system tests of a certain (very data intensive) program crashed
> as soon as it started to use multilib/niagara2_memcpy, due to memory
> corruption. They run just fine after this patch is applied.
>
> We also observed that jar would occasionally raise
> java.util.zip.ZipException. This was due to the fact the last two bytes
> of a buffer were not apparently being copied by memcpy. Again, this
> patch fixes that problem.
>
> The member is extremely expensive and I avoided it intentionally.
>
> Yes I suspected that, given how carefully that code is written. We are
> aware that membars are painful on the T2 (any membar, because all
> flavors are mapped to #Sync) but the risk of overlaps is not only
> theoretical in this case, unfortunately :(
Ok I'll install this fix after some testing and update the copy of the
same code in the kernel as well, thanks.
Thanks.