From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f197.google.com (mail-io0-f197.google.com [209.85.223.197]) by kanga.kvack.org (Postfix) with ESMTP id 848596B0003 for ; Wed, 21 Feb 2018 12:57:51 -0500 (EST) Received: by mail-io0-f197.google.com with SMTP id r1so2317650ioa.0 for ; Wed, 21 Feb 2018 09:57:51 -0800 (PST) Received: from resqmta-ch2-10v.sys.comcast.net (resqmta-ch2-10v.sys.comcast.net. [2001:558:fe21:29:69:252:207:42]) by mx.google.com with ESMTPS id g1si18563586itd.56.2018.02.21.09.57.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 09:57:50 -0800 (PST) Date: Wed, 21 Feb 2018 11:57:47 -0600 (CST) From: Christopher Lameter Subject: Re: [PATCH v2 0/3] Directed kmem charging In-Reply-To: Message-ID: References: <20180221030101.221206-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Shakeel Butt Cc: Jan Kara , Amir Goldstein , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Greg Thelen , Johannes Weiner , Michal Hocko , Vladimir Davydov , Mel Gorman , Vlastimil Babka , linux-fsdevel , Linux MM , Cgroups , LKML On Wed, 21 Feb 2018, Shakeel Butt wrote: > On Wed, Feb 21, 2018 at 8:09 AM, Christopher Lameter wrote: > > Another way to solve this is to switch the user context right? > > > > Isnt it possible to avoid these patches if do the allocation in another > > task context instead? > > > > Sorry, can you please explain what you mean by 'switch the user > context'. Is there any example in kernel which does something similar? See include/linux/task_work.h. One use case is in mntput_no_expire() in linux/fs/namespace.c > > Are there really any other use cases beyond fsnotify? > > > > Another use case I have in mind and plan to upstream is to bind a > filesystem mount with a memcg. So, all the file pages (or anon pages > for shmem) and kmem (like inodes and dentry) will be charged to that > memcg. The mount logic already uses task_work.h. That may be the approach to expand there. -- 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: email@kvack.org