Re: [PATCH v2] [RFC] mm: fs: Invalidate BH LRU during page migration

2021-02-11 Thread Minchan Kim
On Thu, Feb 11, 2021 at 11:39:05AM -0800, Chris Goldsworthy wrote: > On 2021-02-11 06:09, Matthew Wilcox wrote: > > On Wed, Feb 10, 2021 at 09:35:40PM -0800, Chris Goldsworthy wrote: > > > +/* These are used to control the BH LRU invalidation during page > > > migration */ > > > +static struct cpum

Re: [PATCH v2] [RFC] mm: fs: Invalidate BH LRU during page migration

2021-02-11 Thread Minchan Kim
On Wed, Feb 10, 2021 at 09:35:40PM -0800, Chris Goldsworthy wrote: > Pages containing buffer_heads that are in one of the per-CPU > buffer_head LRU caches will be pinned and thus cannot be migrated. > This can prevent CMA allocations from succeeding, which are often used > on platforms with co-proc

Re: [PATCH v2] [RFC] mm: fs: Invalidate BH LRU during page migration

2021-02-11 Thread Chris Goldsworthy
On 2021-02-11 06:09, Matthew Wilcox wrote: On Wed, Feb 10, 2021 at 09:35:40PM -0800, Chris Goldsworthy wrote: +/* These are used to control the BH LRU invalidation during page migration */ +static struct cpumask lru_needs_invalidation; +static bool bh_lru_disabled = false; As I asked before,

Re: [PATCH v2] [RFC] mm: fs: Invalidate BH LRU during page migration

2021-02-11 Thread Matthew Wilcox
On Wed, Feb 10, 2021 at 09:35:40PM -0800, Chris Goldsworthy wrote: > +/* These are used to control the BH LRU invalidation during page migration */ > +static struct cpumask lru_needs_invalidation; > +static bool bh_lru_disabled = false; As I asked before, what protects this on an SMP system? > @@

[PATCH v2] [RFC] mm: fs: Invalidate BH LRU during page migration

2021-02-10 Thread Chris Goldsworthy
Pages containing buffer_heads that are in one of the per-CPU buffer_head LRU caches will be pinned and thus cannot be migrated. This can prevent CMA allocations from succeeding, which are often used on platforms with co-processors (such as a DSP) that can only use physically contiguous memory. It c