lkml.org 
[lkml]   [2016]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 2/8] mm: Add specialized fallback zonelist for coherent device memory nodes
From
Date
On 10/24/2016 10:40 PM, Dave Hansen wrote:
> On 10/23/2016 09:31 PM, Anshuman Khandual wrote:
>> +#ifdef CONFIG_COHERENT_DEVICE
>> + /*
>> + * Isolation requiring coherent device memory node's zones
>> + * should not be part of any other node's fallback zonelist
>> + * but it's own fallback list.
>> + */
>> + if (isolated_cdm_node(node) && (pgdat->node_id != node))
>> + continue;
>> +#endif
>
> Total nit: Why do you need an #ifdef here when you had
>
> +#ifdef CONFIG_COHERENT_DEVICE
> +#define node_cdm(nid) (NODE_DATA(nid)->coherent_device)
> +#define set_cdm_isolation(nid) (node_cdm(nid) = 1)
> +#define clr_cdm_isolation(nid) (node_cdm(nid) = 0)
> +#define isolated_cdm_node(nid) (node_cdm(nid) == 1)
> +#else
> +#define set_cdm_isolation(nid) ()
> +#define clr_cdm_isolation(nid) ()
> +#define isolated_cdm_node(nid) (0)
> +#endif
>
> in your last patch?

Right, the "if" condition with an "&&" as a whole would have evaluated
to be false. Hence the "ifdef" is not required. Will change it next time
around. Thanks for pointing out.

\
 
 \ /
  Last update: 2016-10-25 03:28    [W:0.095 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site