linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM TOPIC] slab reclaim
@ 2016-12-28 13:09 Michal Hocko
  2017-01-02 11:02 ` [Lsf-pc] " Jan Kara
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Hocko @ 2016-12-28 13:09 UTC (permalink / raw)
  To: lsf-pc; +Cc: linux-mm, linux-fsdevel

Hi,
I would like to propose the following for LSF/MM discussion. Both MM and
FS people should be involved.

The current way of the slab reclaim is rather suboptimal from 2
perspectives.

1) The slab allocator relies on shrinkers to release pages but shrinkers
are object rather than page based. This means that the memory reclaim
asks to free some pages, slab asks shrinkers to free some objects
and the result might be that nothing really gets freed even though
shrinkers do their jobs properly because some objects are still pinning
the page. This is not a new problem and it has been discussed in the
past. Dave Chinner has even suggested a solution [1] which sounds like
the right approach. There was no follow up and I believe we should
into implementing it.

2) The way we scale slab reclaim pressure depends on the regular LRU
reclaim. There are workloads which do not general a lot of pages on LRUs
while they still consume a lot of slab memory. We can end up even going
OOM because the slab reclaim doesn't free up enough. I am not really
sure how the proper solution should look like but either we need some
way of slab consumption throttling or we need a more clever slab
pressure estimation.

[1] https://lkml.org/lkml/2010/2/8/329.
-- 
Michal Hocko
SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lsf-pc] [LSF/MM TOPIC] slab reclaim
  2016-12-28 13:09 [LSF/MM TOPIC] slab reclaim Michal Hocko
@ 2017-01-02 11:02 ` Jan Kara
  2017-01-05 10:15   ` Vlastimil Babka
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2017-01-02 11:02 UTC (permalink / raw)
  To: Michal Hocko; +Cc: lsf-pc, linux-fsdevel, linux-mm

Hi!

On Wed 28-12-16 14:09:51, Michal Hocko wrote:
> I would like to propose the following for LSF/MM discussion. Both MM and
> FS people should be involved.
> 
> The current way of the slab reclaim is rather suboptimal from 2
> perspectives.
> 
> 1) The slab allocator relies on shrinkers to release pages but shrinkers
> are object rather than page based. This means that the memory reclaim
> asks to free some pages, slab asks shrinkers to free some objects
> and the result might be that nothing really gets freed even though
> shrinkers do their jobs properly because some objects are still pinning
> the page. This is not a new problem and it has been discussed in the
> past. Dave Chinner has even suggested a solution [1] which sounds like
> the right approach. There was no follow up and I believe we should
> into implementing it.
> 
> 2) The way we scale slab reclaim pressure depends on the regular LRU
> reclaim. There are workloads which do not general a lot of pages on LRUs
> while they still consume a lot of slab memory. We can end up even going
> OOM because the slab reclaim doesn't free up enough. I am not really
> sure how the proper solution should look like but either we need some
> way of slab consumption throttling or we need a more clever slab
> pressure estimation.
> 
> [1] https://lkml.org/lkml/2010/2/8/329.

I'm interested in this topic although I think it currently needs more
coding and experimenting than discussions...

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lsf-pc] [LSF/MM TOPIC] slab reclaim
  2017-01-02 11:02 ` [Lsf-pc] " Jan Kara
@ 2017-01-05 10:15   ` Vlastimil Babka
  2017-01-30 18:47     ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Vlastimil Babka @ 2017-01-05 10:15 UTC (permalink / raw)
  To: Jan Kara, Michal Hocko; +Cc: lsf-pc, linux-fsdevel, linux-mm

On 01/02/2017 12:02 PM, Jan Kara wrote:
> Hi!
> 
> On Wed 28-12-16 14:09:51, Michal Hocko wrote:
>> I would like to propose the following for LSF/MM discussion. Both MM and
>> FS people should be involved.
>>
>> The current way of the slab reclaim is rather suboptimal from 2
>> perspectives.
>>
>> 1) The slab allocator relies on shrinkers to release pages but shrinkers
>> are object rather than page based. This means that the memory reclaim
>> asks to free some pages, slab asks shrinkers to free some objects
>> and the result might be that nothing really gets freed even though
>> shrinkers do their jobs properly because some objects are still pinning
>> the page. This is not a new problem and it has been discussed in the
>> past. Dave Chinner has even suggested a solution [1] which sounds like
>> the right approach. There was no follow up and I believe we should
>> into implementing it.
>>
>> 2) The way we scale slab reclaim pressure depends on the regular LRU
>> reclaim. There are workloads which do not general a lot of pages on LRUs
>> while they still consume a lot of slab memory. We can end up even going
>> OOM because the slab reclaim doesn't free up enough. I am not really
>> sure how the proper solution should look like but either we need some
>> way of slab consumption throttling or we need a more clever slab
>> pressure estimation.
>>
>> [1] https://lkml.org/lkml/2010/2/8/329.
> 
> I'm interested in this topic although I think it currently needs more
> coding and experimenting than discussions...

Yeah, some of the related stuff that was discussed at Kernel Summit [1]
would be nice to have at least prototyped, i.e. the dentry cache
separation and the slab helper for providing objects on the same page?

[1] https://lwn.net/Articles/705758/

> 
> 								Honza
> 

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lsf-pc] [LSF/MM TOPIC] slab reclaim
  2017-01-05 10:15   ` Vlastimil Babka
@ 2017-01-30 18:47     ` Christoph Lameter
  2017-02-10 14:55       ` Michal Hocko
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2017-01-30 18:47 UTC (permalink / raw)
  To: Vlastimil Babka; +Cc: Jan Kara, Michal Hocko, lsf-pc, linux-fsdevel, linux-mm

On Thu, 5 Jan 2017, Vlastimil Babka wrote:

>
> Yeah, some of the related stuff that was discussed at Kernel Summit [1]
> would be nice to have at least prototyped, i.e. the dentry cache
> separation and the slab helper for providing objects on the same page?
>
> [1] https://lwn.net/Articles/705758/

Hmmm. Sorry I am a bit late reading this I think. But I have a patchset
that addresses some of these issues. See https://lwn.net/Articles/371892/
Would like to rework some of that for the current kernel sources. Matthew
Wilcox told me that he may be able top use this to implement
reclaim/defrag in the radix tree code.

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lsf-pc] [LSF/MM TOPIC] slab reclaim
  2017-01-30 18:47     ` Christoph Lameter
@ 2017-02-10 14:55       ` Michal Hocko
  2017-02-10 17:54         ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Hocko @ 2017-02-10 14:55 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Vlastimil Babka, Jan Kara, lsf-pc, linux-fsdevel, linux-mm

On Mon 30-01-17 12:47:04, Cristopher Lameter wrote:
> On Thu, 5 Jan 2017, Vlastimil Babka wrote:
> 
> >
> > Yeah, some of the related stuff that was discussed at Kernel Summit [1]
> > would be nice to have at least prototyped, i.e. the dentry cache
> > separation and the slab helper for providing objects on the same page?
> >
> > [1] https://lwn.net/Articles/705758/
> 
> Hmmm. Sorry I am a bit late reading this I think. But I have a patchset
> that addresses some of these issues. See https://lwn.net/Articles/371892/

Yeah, this is the email thread I have referenced in my initial email. I
didn't reference the first email because Dave had some concerns about
your approach and then the discussion moved on to an approach which
sounds reasonable to me [2]

[2] https://lkml.org/lkml/2010/2/8/329

-- 
Michal Hocko
SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lsf-pc] [LSF/MM TOPIC] slab reclaim
  2017-02-10 14:55       ` Michal Hocko
@ 2017-02-10 17:54         ` Christoph Lameter
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2017-02-10 17:54 UTC (permalink / raw)
  To: Michal Hocko; +Cc: Vlastimil Babka, Jan Kara, lsf-pc, linux-fsdevel, linux-mm

On Fri, 10 Feb 2017, Michal Hocko wrote:

> Yeah, this is the email thread I have referenced in my initial email. I
> didn't reference the first email because Dave had some concerns about
> your approach and then the discussion moved on to an approach which
> sounds reasonable to me [2]
>
> [2] https://lkml.org/lkml/2010/2/8/329

Dont see much there to go on aside from the statement of the problem.

--
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-10 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-28 13:09 [LSF/MM TOPIC] slab reclaim Michal Hocko
2017-01-02 11:02 ` [Lsf-pc] " Jan Kara
2017-01-05 10:15   ` Vlastimil Babka
2017-01-30 18:47     ` Christoph Lameter
2017-02-10 14:55       ` Michal Hocko
2017-02-10 17:54         ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).