Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-26 Thread Mel Gorman
On Tue, Aug 25, 2015 at 01:09:35PM +0200, Vlastimil Babka wrote: > On 08/25/2015 12:33 PM, Mel Gorman wrote: > >On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: > >>On 24.8.2015 15:16, Mel Gorman wrote: > > > > return read_seqcount_retry(>mems_allowed_seq, seq); >

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-26 Thread Michal Hocko
On Mon 24-08-15 13:09:43, Mel Gorman wrote: > David Rientjes correctly pointed out that the "root cpuset may not exclude > mems on the system so, even if mounted, there's no need to check or be > worried about concurrent change when there is only one cpuset". Hmm, but cpuset_inc() is called only

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-26 Thread Michal Hocko
On Mon 24-08-15 13:09:43, Mel Gorman wrote: David Rientjes correctly pointed out that the root cpuset may not exclude mems on the system so, even if mounted, there's no need to check or be worried about concurrent change when there is only one cpuset. Hmm, but cpuset_inc() is called only from

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-26 Thread Mel Gorman
On Tue, Aug 25, 2015 at 01:09:35PM +0200, Vlastimil Babka wrote: On 08/25/2015 12:33 PM, Mel Gorman wrote: On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: On 24.8.2015 15:16, Mel Gorman wrote: return read_seqcount_retry(current-mems_allowed_seq, seq); @@ -139,7

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-25 Thread Vlastimil Babka
On 08/25/2015 12:33 PM, Mel Gorman wrote: On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: On 24.8.2015 15:16, Mel Gorman wrote: return read_seqcount_retry(>mems_allowed_seq, seq); @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t nodemask) #else /*

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-25 Thread Mel Gorman
On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: > On 24.8.2015 15:16, Mel Gorman wrote: > >>> > >>> return read_seqcount_retry(>mems_allowed_seq, seq); > >>> @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t > >>> nodemask) > >>> > >>> #else /* !CONFIG_CPUSETS

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-25 Thread Mel Gorman
On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: On 24.8.2015 15:16, Mel Gorman wrote: return read_seqcount_retry(current-mems_allowed_seq, seq); @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t nodemask) #else /* !CONFIG_CPUSETS */ -static

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-25 Thread Vlastimil Babka
On 08/25/2015 12:33 PM, Mel Gorman wrote: On Mon, Aug 24, 2015 at 10:53:37PM +0200, Vlastimil Babka wrote: On 24.8.2015 15:16, Mel Gorman wrote: return read_seqcount_retry(current-mems_allowed_seq, seq); @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t nodemask)

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Vlastimil Babka
On 24.8.2015 15:16, Mel Gorman wrote: >>> >>> return read_seqcount_retry(>mems_allowed_seq, seq); >>> @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t nodemask) >>> >>> #else /* !CONFIG_CPUSETS */ >>> >>> -static inline bool cpusets_enabled(void) { return false; } >>>

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Mel Gorman
On Mon, Aug 24, 2015 at 02:37:41PM +0200, Vlastimil Babka wrote: > > > >+/* Returns true if a cpuset exists that can set cpuset.mems */ > >+static inline bool cpusets_mems_enabled(void) > >+{ > >+return nr_cpusets() > 1; > >+} > >+ > > Hm, but this loses the benefits of static key branches? >

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Vlastimil Babka
On 08/24/2015 02:09 PM, Mel Gorman wrote: David Rientjes correctly pointed out that the "root cpuset may not exclude mems on the system so, even if mounted, there's no need to check or be worried about concurrent change when there is only one cpuset". The three checks for cpusets_enabled() care

[PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Mel Gorman
David Rientjes correctly pointed out that the "root cpuset may not exclude mems on the system so, even if mounted, there's no need to check or be worried about concurrent change when there is only one cpuset". The three checks for cpusets_enabled() care whether a cpuset exists that can limit

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Vlastimil Babka
On 08/24/2015 02:09 PM, Mel Gorman wrote: David Rientjes correctly pointed out that the root cpuset may not exclude mems on the system so, even if mounted, there's no need to check or be worried about concurrent change when there is only one cpuset. The three checks for cpusets_enabled() care

[PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Mel Gorman
David Rientjes correctly pointed out that the root cpuset may not exclude mems on the system so, even if mounted, there's no need to check or be worried about concurrent change when there is only one cpuset. The three checks for cpusets_enabled() care whether a cpuset exists that can limit

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Mel Gorman
On Mon, Aug 24, 2015 at 02:37:41PM +0200, Vlastimil Babka wrote: +/* Returns true if a cpuset exists that can set cpuset.mems */ +static inline bool cpusets_mems_enabled(void) +{ +return nr_cpusets() 1; +} + Hm, but this loses the benefits of static key branches? How about

Re: [PATCH 04/12] mm, page_alloc: Only check cpusets when one exists that can be mem-controlled

2015-08-24 Thread Vlastimil Babka
On 24.8.2015 15:16, Mel Gorman wrote: return read_seqcount_retry(current-mems_allowed_seq, seq); @@ -139,7 +141,7 @@ static inline void set_mems_allowed(nodemask_t nodemask) #else /* !CONFIG_CPUSETS */ -static inline bool cpusets_enabled(void) { return false; } +static inline bool