[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160216004531.GA28260@thunk.org>
Date: Mon, 15 Feb 2016 19:45:31 -0500
From: Theodore Ts'o <tytso@....edu>
To: Daniel Walker <danielwa@...co.com>
Cc: Dave Chinner <david@...morbit.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Khalid Mughal <khalidm@...co.com>,
xe-kernel@...ernal.cisco.com, dave.hansen@...el.com,
hannes@...xchg.org, riel@...hat.com,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, "Nag Avadhanam (nag)" <nag@...co.com>
Subject: Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count
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.
>
> Approximate point-in-time indication is an accurate characterization
> of what we are doing. This is good enough for us. NO matter what we
> do, we are never going to be able to address the "time of check to
> time of use” window. But, this approximation works reasonably well
> for our use case.
Why do you need such accuracy, and what do you consider "good enough".
Having something which iterates over all of the inodes in the system
is something that really shouldn't be in a general production kernel
At the very least it should only be accessible by root (so now only a
careless system administrator can DOS attack the system) but the
Dave's original question still stands. Why do you need a certain
level of accuracy regarding how much memory is available after
dropping all of the caches? What problem are you trying to
solve/avoid?
It may be that you are going about things completely the wrong way,
which is why understanding the higher order problem you are trying to
solve might be helpful in finding something which is safer,
architecturally cleaner, and something that could go into the upstream
kernel.
Cheers,
- Ted
Powered by blists - more mailing lists