Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1195264
| From | Vladimir Davydov <vdavydov@parallels.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -mm v9 0/8] idle memory tracking |
| Date | 2015-07-29 16:50 +0200 |
| Message-ID | <pRAQa-2CD-13@gated-at.bofh.it> (permalink) |
| References | <pNW2R-2LM-3@gated-at.bofh.it> <pRyOm-8ci-23@gated-at.bofh.it> <pRA3N-1sA-41@gated-at.bofh.it> <pRAn7-24H-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 29, 2015 at 07:12:13AM -0700, Michel Lespinasse wrote: > On Wed, Jul 29, 2015 at 6:59 AM, Vladimir Davydov <vdavydov@parallels.com> > wrote: > >> I guess the primary reason to rely on the pfn rather than the LRU walk, > >> which would be more targeted (especially for memcg cases), is that we > >> cannot hold lru lock for the whole LRU walk and we cannot continue > >> walking after the lock is dropped. Maybe we can try to address that > >> instead? I do not think this is easy to achieve but have you considered > >> that as an option? > > > > Yes, I have, and I've come to a conclusion it's not doable, because LRU > > lists can be constantly rotating at an arbitrary rate. If you have an > > idea in mind how this could be done, please share. > > > > Speaking of LRU-vs-PFN walk, iterating over PFNs has its own advantages: > > - You can distribute a walk in time to avoid CPU bursts. > > - You are free to parallelize the scanner as you wish to decrease the > > scan time. > > There is a third way: one could go through every MM in the system and scan > their page tables. Doing things that way turns out to be generally faster > than scanning by physical address, because you don't have to go through > RMAP for every page. But, you end up needing to take the mmap_sem lock of > every MM (in turn) while scanning them, and that degrades quickly under > memory load, which is exactly when you most need this feature. So, scan by > address is still what we use here. Page table scan approach has the inherent problem - it ignores unmapped page cache. If a workload does a lot of read/write or map-access-unmap operations, we won't be able to even roughly estimate its wss. Thanks, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH -mm v9 0/8] idle memory tracking Vladimir Davydov <vdavydov@parallels.com> - 2015-07-29 16:00 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Michel Lespinasse <walken@google.com> - 2015-07-29 16:20 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Michal Hocko <mhocko@kernel.org> - 2015-07-29 16:30 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Michal Hocko <mhocko@kernel.org> - 2015-07-30 11:10 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Vladimir Davydov <vdavydov@parallels.com> - 2015-07-30 11:40 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Vladimir Davydov <vdavydov@parallels.com> - 2015-07-30 11:20 +0200
Re: [PATCH -mm v9 0/8] idle memory tracking Vladimir Davydov <vdavydov@parallels.com> - 2015-07-29 16:50 +0200
csiph-web