public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Ondřej Bílka" <neleai@seznam.cz>
To: tudorb at gmail dot com <sourceware-bugzilla@sourceware.org>
Cc: glibc-bugs@sourceware.org
Subject: Re: [Bug libc/12518] memcpy acts randomly (and differently) with overlapping areas
Date: Mon, 19 Aug 2013 23:48:00 -0000	[thread overview]
Message-ID: <20130819234842.GA7823@domone.kolej.mff.cuni.cz> (raw)
In-Reply-To: <bug-12518-131-Bf2M0qA5U8@http.sourceware.org/bugzilla/>

On Mon, Aug 12, 2013 at 05:19:54PM +0000, tudorb at gmail dot com wrote:
> --- Comment #28 from Tudor Bosman <tudorb at gmail dot com> ---
> FYI, this bug has bitten me in a different way: memcpy() copying backwards
> defeats the MADV_SEQUENTIAL flag to madvise(). A trivial file copier
> implementation (mmap source, mmap destination, set MADV_SEQUENTIAL, memcpy from
> source to destination) would perform much worse on machines that support SSSE3
> than on machines that don't because of this bug.
>
Wait, do you have overlapping source and destination areas? If so then a
backward copy is necessary.

Or is backward copy called for not overlapping areas? 
I have a patch that could call backward copy only if src-n < dest < src+n holds.

> (Before anyone tells me that I should copy files using read() and write(), my
> actual usage pattern was more complex, but the details are irrelevant.)
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.



  reply	other threads:[~2013-08-19 23:48 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25  2:26 [Bug libc/12518] New: " torvalds@linux-foundation.org
2011-02-25  2:29 ` [Bug libc/12518] " torvalds@linux-foundation.org
2011-02-25  3:57 ` hjl.tools at gmail dot com
2011-02-25  4:15 ` torvalds@linux-foundation.org
2011-02-25  9:59 ` drepper.fsp at gmail dot com
2011-02-25 11:49 ` tolzmann at molgen dot mpg.de
2011-02-25 12:07 ` jakub at redhat dot com
2011-02-25 15:20 ` hjl.tools at gmail dot com
2011-02-26  1:56 ` drepper.fsp at gmail dot com
2011-03-02  4:03 ` alexander.hunt2005 at gmail dot com
2011-03-02 20:12 ` smconvey at gmail dot com
2011-03-03 23:28 ` felipe.contreras at gmail dot com
2011-03-04  3:02 ` jvillalo at redhat dot com
2011-03-04  9:28 ` thierry.vignaud at gmail dot com
2011-03-04 16:07 ` ml-bz-dale at riyescott dot com
2011-03-04 23:42 ` drepper.fsp at gmail dot com
2011-03-04 23:54 ` torvalds@linux-foundation.org
2011-03-05  0:28 ` felipe.contreras at gmail dot com
2011-03-05 13:28 ` oliver.henshaw at gmail dot com
2011-03-12 16:38 ` tmoody at ku dot edu
2011-03-24 21:04 ` bvasselle at gmail dot com
2011-03-25  4:37 ` hjl.tools at gmail dot com
2011-03-25  6:46 ` jakub at redhat dot com
2011-03-28 11:53 ` tmraz at redhat dot com
2011-03-28 11:54 ` felipe.contreras at gmail dot com
2011-03-29 14:43 ` felipe.contreras at gmail dot com
2011-03-29 22:28 ` bvasselle at gmail dot com
2011-03-30  5:14 ` felipe.contreras at gmail dot com
2011-03-30  7:21 ` felipe.contreras at gmail dot com
2011-03-30 10:20 ` y.pronenko at gmail dot com
2011-03-31  8:37 ` shaforostoff at gmail dot com
2011-04-01 23:42 ` drepper.fsp at gmail dot com
2011-04-02  2:57 ` hjl.tools at gmail dot com
2011-04-10 15:39 ` bvasselle at gmail dot com
2011-04-10 15:50 ` felipe.contreras at gmail dot com
2011-05-04 13:32 ` vincent+libc at vinc17 dot org
2011-05-04 15:02 ` felipe.contreras at gmail dot com
2011-06-07  3:07 ` kenyon at kenyonralph dot com
2013-08-12 17:20 ` tudorb at gmail dot com
2013-08-19 23:48   ` Ondřej Bílka [this message]
2013-08-19 23:48 ` neleai at seznam dot cz
2013-08-20  1:12 ` tudorb at gmail dot com
2014-02-16 19:41 ` jackie.rosen at hushmail dot com
2014-02-16 19:54 ` kenyon at kenyonralph dot com
2014-05-28 19:41 ` schwab at sourceware dot org
2014-06-27 13:49 ` fweimer at redhat dot com
2015-02-25 10:28 ` mwest@awek-microdata.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130819234842.GA7823@domone.kolej.mff.cuni.cz \
    --to=neleai@seznam.cz \
    --cc=glibc-bugs@sourceware.org \
    --cc=sourceware-bugzilla@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).