Re: sequential 1MB mmap read ends in 1 page sync read-ahead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 14, 2023 at 10:47:39PM +0200, Bernd Schubert wrote:
> > Up to bs=512K it works fine, 1M (and for what it matters
> > already 768K) introduce the order=0 issue.
> 
> Hmm, I replaced memcpy with dumb version, that copies byte by byte - problem
> gone. Is it possible that the optimized memcpy causes caused kind of random
> memory access and confuses mm / readahead?
> And somehow your memcpy or system is not doing that?

Oh, that would make sense!  If the memcpy() works high-to-low, then
you'd see exactly the behaviour you're reporting.  Whereas low-to-high
results in the behaviour I'm seeing.

Hm.  I don't know what to do about that.  Maybe a "sufficiently large"
memcpy should call posix_madvise(src, n, POSIX_MADV_WILLNEED)



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux