Re: [PATCH v2 0/3] Directed kmem charging

2018-02-22 Thread Christopher Lameter
On Wed, 21 Feb 2018, Andrew Morton wrote: > What do others think? I think the changes to the hotpaths of the slab allocators increasing register pressure in some of the hotttest paths of the kernel are problematic. Its better to do the allocation properly in the task context to which it is final

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-22 Thread Christopher Lameter
On Thu, 22 Feb 2018, Jan Kara wrote: > I don't see how task work can be used here. Firstly I don't know of a case > where task work would be used for something else than the current task - > and that is substantial because otherwise you have to deal with lots of > problems like races with task exi

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-22 Thread Jan Kara
On Wed 21-02-18 11:57:47, Christopher Lameter wrote: > 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 allo

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-22 Thread Jan Kara
On Wed 21-02-18 12:54:26, Andrew Morton wrote: > On Wed, 21 Feb 2018 09:18:35 -0800 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

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-21 Thread Andrew Morton
On Wed, 21 Feb 2018 09:18:35 -0800 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? > > >

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-21 Thread Shakeel Butt
On Wed, Feb 21, 2018 at 9:57 AM, Christopher Lameter wrote: > 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 a

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-21 Thread Christopher Lameter
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 yo

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-21 Thread Shakeel Butt
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 contex

Re: [PATCH v2 0/3] Directed kmem charging

2018-02-21 Thread Christopher Lameter
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? Are there really any other use cases beyond fsnotify? The charging of the memory works on a per page level but the allocation occur from t

[PATCH v2 0/3] Directed kmem charging

2018-02-20 Thread Shakeel Butt
This patchset introduces memcg variant memory allocation functions. The caller can explicitly pass the memcg to charge for kmem allocations. Currently the kernel, for __GFP_ACCOUNT memory allocation requests, extract the memcg of the current task to charge for the kmem allocation. This patch series