From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965090AbcJYBWd (ORCPT ); Mon, 24 Oct 2016 21:22:33 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34158 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933339AbcJYBWb (ORCPT ); Mon, 24 Oct 2016 21:22:31 -0400 Subject: Re: [RFC 1/8] mm: Define coherent device memory node 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-2-git-send-email-khandual@linux.vnet.ibm.com> <580E4043.4090200@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:52:19 +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: <580E4043.4090200@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-0016-0000-0000-000001E2A9BA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102501-0017-0000-0000-000005B2C8D2 Message-Id: <580EB3CB.5080200@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-1610250021 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2016 10:39 PM, Dave Hansen wrote: >> +#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 > FWIW, I think adding all this "cdm" gunk in the names is probably a bad > thing. > > I can think of other memory types that are coherent, but > non-device-based that might want behavior like this. Hmm, I was not aware about non-device-based coherent memory. Could you please name some of them ? If thats the case we need to change CDM to some thing which can accommodate both device and non device based coherent memory. May be like "Differentiated/special coherent memory". But it needs to communicate that its not system RAM. Thats the idea.