Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941431AbcJYB16 (ORCPT ); Mon, 24 Oct 2016 21:27:58 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48560 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932479AbcJYB14 (ORCPT ); Mon, 24 Oct 2016 21:27:56 -0400 Subject: Re: [RFC 2/8] mm: Add specialized fallback zonelist for coherent device memory nodes To: Dave Hansen , Anshuman Khandual , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <1477283517-2504-1-git-send-email-khandual@linux.vnet.ibm.com> <1477283517-2504-3-git-send-email-khandual@linux.vnet.ibm.com> <580E406B.4050205@intel.com> Cc: mhocko@suse.com, js1304@gmail.com, vbabka@suse.cz, mgorman@suse.de, minchan@kernel.org, akpm@linux-foundation.org, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com From: Anshuman Khandual Date: Tue, 25 Oct 2016 06:57:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <580E406B.4050205@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102501-0044-0000-0000-000001F2A800 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102501-0045-0000-0000-000005CEC331 Message-Id: <580EB50F.3070207@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-24_19:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610250022 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 30 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.