Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-16 Thread Nag Avadhanam
On Tue, 16 Feb 2016, Vladimir Davydov wrote: On Tue, Feb 16, 2016 at 02:58:04AM +, Nag Avadhanam (nag) wrote: We have a class of platforms that are essentially swap-less embedded systems that have limited memory resources (2GB and less). There is a need to implement early alerts (before th

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-16 Thread Rik van Riel
On Tue, 2016-02-16 at 16:28 +1100, Dave Chinner wrote: > On Mon, Feb 15, 2016 at 03:52:31PM -0800, Daniel Walker wrote: > > On 02/15/2016 03:05 PM, Dave Chinner wrote: > > >  > > > As for a replacement, looking at what pages you consider > > > "droppable" > > > is really only file pages that are no

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-16 Thread Vladimir Davydov
On Tue, Feb 16, 2016 at 02:58:04AM +, Nag Avadhanam (nag) wrote: > We have a class of platforms that are essentially swap-less embedded > systems that have limited memory resources (2GB and less). > > There is a need to implement early alerts (before the OOM killer kicks in) > based on the cur

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-16 Thread Dave Chinner
On Mon, Feb 15, 2016 at 11:14:13PM -0800, Nag Avadhanam wrote: > On Mon, 15 Feb 2016, Dave Chinner wrote: > > >On Tue, Feb 16, 2016 at 02:58:04AM +, Nag Avadhanam (nag) wrote: > >>Its the calculation of the # of bytes of non-reclaimable file system cache > >>pages that has been troubling us. W

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-16 Thread Dave Chinner
On Mon, Feb 15, 2016 at 09:57:42PM -0800, Nag Avadhanam wrote: > On Mon, 15 Feb 2016, Dave Chinner wrote: > >So, to pick a random active server here: > > > > before after > >Active(file): 12103200 kB 24060 kB > >Inactive(file): 5976676 kB 1380 kB > >Mapped:313

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Nag Avadhanam
On Mon, 15 Feb 2016, Dave Chinner wrote: On Tue, Feb 16, 2016 at 02:58:04AM +, Nag Avadhanam (nag) wrote: Its the calculation of the # of bytes of non-reclaimable file system cache pages that has been troubling us. We do not want to count inactive file pages (of programs/binaries) that were

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Nag Avadhanam
On Mon, 15 Feb 2016, Dave Chinner wrote: On Mon, Feb 15, 2016 at 03:52:31PM -0800, Daniel Walker wrote: On 02/15/2016 03:05 PM, Dave Chinner wrote: What you are proposing isn't accurate, either, because it will be stale by the time the inode cache traversal is completed and the count returned

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Dave Chinner
On Tue, Feb 16, 2016 at 02:58:04AM +, Nag Avadhanam (nag) wrote: > Its the calculation of the # of bytes of non-reclaimable file system cache > pages that has been troubling us. We do not want to count inactive file > pages (of programs/binaries) that were once mapped by any process in the > sy

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Dave Chinner
On Mon, Feb 15, 2016 at 03:52:31PM -0800, Daniel Walker wrote: > On 02/15/2016 03:05 PM, Dave Chinner wrote: > >What you are proposing isn't accurate, either, because it will be > >stale by the time the inode cache traversal is completed and the > >count returned to userspace. e.g. pages that have

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Nag Avadhanam (nag)
We have a class of platforms that are essentially swap-less embedded systems that have limited memory resources (2GB and less). There is a need to implement early alerts (before the OOM killer kicks in) based on the current memory usage so admins can take appropriate steps (do not initiate provisi

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Theodore Ts'o
On Mon, Feb 15, 2016 at 03:52:31PM -0800, Daniel Walker wrote: > >>We need it to determine accurately what the free memory in the > >>system is. If you know where we can get this information already > >>please tell, we aren't aware of it. For instance /proc/meminfo isn't > >>accurate enough. > > A

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Daniel Walker
On 02/15/2016 03:05 PM, Dave Chinner wrote: On Mon, Feb 15, 2016 at 10:19:54AM -0800, Daniel Walker wrote: On 02/14/2016 01:18 PM, Dave Chinner wrote: On Fri, Feb 12, 2016 at 12:14:39PM -0800, Daniel Walker wrote: From: Khalid Mughal Currently there is no way to figure out the droppable page

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Dave Chinner
On Mon, Feb 15, 2016 at 10:19:54AM -0800, Daniel Walker wrote: > On 02/14/2016 01:18 PM, Dave Chinner wrote: > >On Fri, Feb 12, 2016 at 12:14:39PM -0800, Daniel Walker wrote: > >>From: Khalid Mughal > >> > >>Currently there is no way to figure out the droppable pagecache size > >>from the meminfo

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-15 Thread Daniel Walker
On 02/14/2016 01:18 PM, Dave Chinner wrote: On Fri, Feb 12, 2016 at 12:14:39PM -0800, Daniel Walker wrote: From: Khalid Mughal Currently there is no way to figure out the droppable pagecache size from the meminfo output. The MemFree size can shrink during normal system operation, when some of

Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-14 Thread Dave Chinner
On Fri, Feb 12, 2016 at 12:14:39PM -0800, Daniel Walker wrote: > From: Khalid Mughal > > Currently there is no way to figure out the droppable pagecache size > from the meminfo output. The MemFree size can shrink during normal > system operation, when some of the memory pages get cached and is >

[PATCH] kernel: fs: drop_caches: add dds drop_caches_count

2016-02-12 Thread Daniel Walker
From: Khalid Mughal Currently there is no way to figure out the droppable pagecache size from the meminfo output. The MemFree size can shrink during normal system operation, when some of the memory pages get cached and is reflected in "Cached" field. Similarly for file operations some of the buff