From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933770AbcJXRiU (ORCPT ); Mon, 24 Oct 2016 13:38:20 -0400 Received: from mga14.intel.com ([192.55.52.115]:11370 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbcJXRiT (ORCPT ); Mon, 24 Oct 2016 13:38:19 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,542,1473145200"; d="scan'208";a="893409718" Subject: Re: [RFC 5/8] mm: Add new flag VM_CDM for coherent device memory To: 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-6-git-send-email-khandual@linux.vnet.ibm.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: Dave Hansen Message-ID: <580E4704.1040104@intel.com> Date: Mon, 24 Oct 2016 10:38:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1477283517-2504-6-git-send-email-khandual@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/2016 09:31 PM, Anshuman Khandual wrote: > VMAs containing coherent device memory should be marked with VM_CDM. These > VMAs need to be identified in various core kernel paths and this new flag > will help in this regard. ... and it's sticky? So if a VMA *ever* has one of these funky pages in it, it's stuck being VM_CDM forever? Never to be merged with other VMAs? Never to see the light of autonuma ever again? What if a 100TB VMA has one page of fancy pants device memory, and the rest normal vanilla memory? Do we really want to consider the whole thing fancy? This whole patch set is looking really hackish. If you want things to be isolated from the VM, them it should probably *actually* be isolated from the VM. As Jerome mentioned, ZONE_DEVICE is probably a better thing to use here than to try what you're attempting. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by kanga.kvack.org (Postfix) with ESMTP id CE8496B0260 for ; Mon, 24 Oct 2016 13:38:14 -0400 (EDT) Received: by mail-pa0-f71.google.com with SMTP id tz10so17163741pab.3 for ; Mon, 24 Oct 2016 10:38:14 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com. [192.55.52.115]) by mx.google.com with ESMTPS id r86si16399666pfk.297.2016.10.24.10.38.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 24 Oct 2016 10:38:14 -0700 (PDT) Subject: Re: [RFC 5/8] mm: Add new flag VM_CDM for coherent device memory References: <1477283517-2504-1-git-send-email-khandual@linux.vnet.ibm.com> <1477283517-2504-6-git-send-email-khandual@linux.vnet.ibm.com> From: Dave Hansen Message-ID: <580E4704.1040104@intel.com> Date: Mon, 24 Oct 2016 10:38:12 -0700 MIME-Version: 1.0 In-Reply-To: <1477283517-2504-6-git-send-email-khandual@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Anshuman Khandual , linux-kernel@vger.kernel.org, linux-mm@kvack.org 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 On 10/23/2016 09:31 PM, Anshuman Khandual wrote: > VMAs containing coherent device memory should be marked with VM_CDM. These > VMAs need to be identified in various core kernel paths and this new flag > will help in this regard. ... and it's sticky? So if a VMA *ever* has one of these funky pages in it, it's stuck being VM_CDM forever? Never to be merged with other VMAs? Never to see the light of autonuma ever again? What if a 100TB VMA has one page of fancy pants device memory, and the rest normal vanilla memory? Do we really want to consider the whole thing fancy? This whole patch set is looking really hackish. If you want things to be isolated from the VM, them it should probably *actually* be isolated from the VM. As Jerome mentioned, ZONE_DEVICE is probably a better thing to use here than to try what you're attempting. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org