From: Glauber Costa <glommer@parallels.com>
To: David Rientjes <rientjes@google.com>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
Pekka Enberg <penberg@kernel.org>, Mel Gorman <mgorman@suse.de>,
Leonid Moiseichuk <leonid.moiseichuk@nokia.com>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
Minchan Kim <minchan@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
John Stultz <john.stultz@linaro.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linaro-kernel@lists.linaro.org, patches@linaro.org,
kernel-team@android.com, linux-man@vger.kernel.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Michal Hocko <mhocko@suse.cz>,
Johannes Weiner <hannes@cmpxchg.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications
Date: Sat, 17 Nov 2012 01:12:40 +0400 [thread overview]
Message-ID: <50A6AC48.6080102@parallels.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1211161157390.2788@chino.kir.corp.google.com>
Hey,
On 11/17/2012 12:04 AM, David Rientjes wrote:
> On Fri, 16 Nov 2012, Glauber Costa wrote:
>
>> My personal take:
>>
>> Most people hate memcg due to the cost it imposes. I've already
>> demonstrated that with some effort, it doesn't necessarily have to be
>> so. (http://lwn.net/Articles/517634/)
>>
>> The one thing I missed on that work, was precisely notifications. If you
>> can come up with a good notifications scheme that *lives* in memcg, but
>> does not *depend* in the memcg infrastructure, I personally think it
>> could be a big win.
>>
>
> This doesn't allow users of cpusets without memcg to have an API for
> memory pressure, that's why I thought it should be a new cgroup that can
> be mounted alongside any existing cgroup, any cgroup in the future, or
> just by itself.
>
>> Doing this in memcg has the advantage that the "per-group" vs "global"
>> is automatically solved, since the root memcg is just another name for
>> "global".
>>
>
> That's true of any cgroup.
Yes. But memcg happens to also deal with memory usage, and already have
a notification mechanism =)
>
>> I honestly like your low/high/oom scheme better than memcg's
>> "threshold-in-bytes". I would also point out that those thresholds are
>> *far* from exact, due to the stock charging mechanism, and can be wrong
>> by as much as O(#cpus). So far, nobody complained. So in theory it
>> should be possible to convert memcg to low/high/oom, while still
>> accepting writes in bytes, that would be thrown in the closest bucket.
>>
>
> I'm wondering if we should have more than three different levels.
>
In the case I outlined below, for backwards compatibility. What I
actually mean is that memcg *currently* allows arbitrary notifications.
One way to merge those, while moving to a saner 3-point notification, is
to still allow the old writes and fit them in the closest bucket.
>> Another thing from one of your e-mails, that may shift you in the memcg
>> direction:
>>
>> "2. The last time I checked, cgroups memory controller did not (and I
>> guess still does not) not account kernel-owned slabs. I asked several
>> times why so, but nobody answered."
>>
>> It should, now, in the latest -mm, although it won't do per-group
>> reclaim (yet).
>>
>
> Not sure where that was written, but I certainly didn't write it
Indeed you didn't, Anton did. It's his proposal, so I actually meant him
everytime I said "you". The fact that you were the last responder made
it confusing - sorry.
> and it's
> not really relevant in this discussion: memory pressure notifications
> would be triggered by reclaim when trying to allocate memory; why we need
> to reclaim or how we got into that state is tangential.
My understanding is that one of the advantages he was pointing of his
mechanism over memcg, is that it would allow one to count slab memory as
well, which memcg won't do (it will, now).
>> I am also failing to see how cpusets would be involved in here. I
>> understand that you may have free memory in terms of size, but still be
>> further restricted by cpuset. But I also think that having multiple
>> entry points for this buy us nothing at all. So the choices I see are:
>>
>
> Umm, why do users of cpusets not want to be able to trigger memory
> pressure notifications?
>
Because cpusets only deal with memory placement, not memory usage.
And it is not that moving a task to cpuset disallows you to do any of
this: you could, as long as the same set of tasks are mounted in a
corresponding memcg.
Of course there are a couple use cases that could benefit from the
orthogonality, but I doubt it would justify the complexity in this case.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-11-16 21:13 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 10:53 Anton Vorontsov
2012-11-07 11:01 ` [RFC 1/3] mm: Add " Anton Vorontsov
2012-11-08 17:01 ` Mel Gorman
2012-11-08 17:14 ` Kirill A. Shutemov
2012-11-13 18:38 ` Jonathan Corbet
2012-11-07 11:01 ` [RFC 2/3] tools/testing: Add vmpressure-test utility Anton Vorontsov
2012-11-07 11:01 ` [RFC 3/3] man-pages: Add man page for vmpressure_fd(2) Anton Vorontsov
2012-11-07 14:19 ` Rik van Riel
2012-11-20 5:52 ` Andrew Morton
2012-11-20 6:24 ` Anton Vorontsov
2012-11-20 18:12 ` David Rientjes
2012-11-21 15:01 ` Mel Gorman
2012-11-21 19:39 ` Andrew Morton
2012-11-22 8:52 ` Pekka Enberg
2012-11-07 11:21 ` [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications Kirill A. Shutemov
2012-11-07 11:28 ` Pekka Enberg
2012-11-07 11:43 ` Kirill A. Shutemov
2012-11-15 3:21 ` David Rientjes
2012-11-15 3:39 ` Anton Vorontsov
2012-11-15 3:59 ` David Rientjes
2012-11-15 7:34 ` Anton Vorontsov
2012-11-15 8:11 ` David Rientjes
2012-11-15 8:52 ` Anton Vorontsov
2012-11-15 21:25 ` David Rientjes
2012-11-16 9:33 ` Glauber Costa
2012-11-16 20:04 ` David Rientjes
2012-11-16 21:12 ` Glauber Costa [this message]
2012-11-16 21:57 ` David Rientjes
2012-11-17 1:21 ` Anton Vorontsov
2012-11-18 22:53 ` David Rientjes
2012-11-19 14:00 ` Glauber Costa
2012-11-19 13:57 ` Glauber Costa
2012-11-20 18:02 ` David Rientjes
2012-11-21 9:30 ` Kirill A. Shutemov
2012-11-21 11:32 ` leonid.moiseichuk
2012-11-21 11:54 ` Glauber Costa
2012-11-21 13:48 ` leonid.moiseichuk
2012-11-26 21:35 ` Michal Hocko
2012-11-19 14:19 ` Glauber Costa
2012-11-20 18:23 ` David Rientjes
2012-11-21 8:27 ` Glauber Costa
2012-11-21 8:46 ` Anton Vorontsov
2012-11-21 9:25 ` Glauber Costa
2012-11-07 11:43 ` Anton Vorontsov
2012-11-07 12:11 ` Kirill A. Shutemov
2012-11-07 12:28 ` Anton Vorontsov
2012-11-07 17:20 ` Greg Thelen
2012-11-07 20:52 ` Pekka Enberg
2012-11-07 11:30 ` Pekka Enberg
2012-11-07 11:31 ` Pekka Enberg
2012-11-07 12:06 ` Anton Vorontsov
2012-11-09 8:32 ` Luiz Capitulino
2012-11-09 9:04 ` Anton Vorontsov
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=50A6AC48.6080102@parallels.com \
--to=glommer@parallels.com \
--cc=anton.vorontsov@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=hannes@cmpxchg.org \
--cc=john.stultz@linaro.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kernel-team@android.com \
--cc=kirill@shutemov.name \
--cc=kosaki.motohiro@gmail.com \
--cc=leonid.moiseichuk@nokia.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=minchan@kernel.org \
--cc=patches@linaro.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=tj@kernel.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