Received: by 10.213.65.68 with SMTP id h4csp665642imn; Wed, 28 Mar 2018 10:27:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+RYJkRN+zm26CdcxUCw47FdSPBF1ahLYcnYJ/WnsFI6kP+IIPfuACWC4heoTx9uLgytgqR X-Received: by 10.98.166.196 with SMTP id r65mr3730682pfl.110.1522258040914; Wed, 28 Mar 2018 10:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522258040; cv=none; d=google.com; s=arc-20160816; b=c4IdKfcKosCjV6KDiC3Ii71dv1U9EEfhQpe9Mq0xMv+bElIF/ZpJ1Yo87dzaK+RYiH XOv2RWHHy1MG71nb04PIAwsZGHRqwhivUgTdKuEFEu4fUIV/CdgkZP7XyIE/sW9SGxcR xMcgwelNuQKyxF0Jrm6GGcjr14woyP3ImmHIUqfstF1FKvx3YfCmUek0arI0t47lLKua v4tjnxzaI6T9dI1W7lOjSk9sxXf1n6Sa/i7iqxpKv3LD5beIUpwnWmQYx65+bx9789bR AJ2pM1YdDhXH1xHxV8CByBLPf7ipZD0oGWhKBtdo9HPdvK4ZMBP4nPGJJWaZqLzaqDlT DwGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=RO00Foy+YFmLh5ILSJQLw+U1FAFLHyAE6O5RsukAFhc=; b=Troy92qrHwqqq9MQ4ree4xz08fGDBxWqCOkRSrxcOrUwQS7XRGUw4+YnGVqDkNdXOL baC8I0H20w7prdLBhR93jMdCsEmMW7eh635w+bUx6Nnw4sk1Fs1NoWkdE9U/S1vQNA8f PWik8L0BJl79UDS+OAg5MOHRXiXNfQrci6ablmif2LXuyjpwYQb5Eh77Ep3gdqbAogWn XLLhVTe6l6hTysSdN/Ixgez6DVAx0VPwO4i4f929DC+CnJaqtJjMVQEQBDTSX82ha100 7JkZQK2aHFQGs+jLXToxdlU72PHgSWQrgNLFQoJFQOdS1w1Dq5YSdFIHkAgUj9keWbeZ 97oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si881226pgv.575.2018.03.28.10.27.06; Wed, 28 Mar 2018 10:27:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752887AbeC1RPF (ORCPT + 99 others); Wed, 28 Mar 2018 13:15:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:55144 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694AbeC1RPD (ORCPT ); Wed, 28 Mar 2018 13:15:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 10:15:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,372,1517904000"; d="scan'208";a="38896429" Received: from pkiser-mobl4.amr.corp.intel.com (HELO [10.252.132.245]) ([10.252.132.245]) by orsmga003.jf.intel.com with ESMTP; 28 Mar 2018 10:15:03 -0700 Subject: Re: [PATCHv2 06/14] mm/page_alloc: Propagate encryption KeyID through page allocator To: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky References: <20180328165540.648-1-kirill.shutemov@linux.intel.com> <20180328165540.648-7-kirill.shutemov@linux.intel.com> Cc: Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Dave Hansen Message-ID: <5d334638-2139-07a1-c999-36a1729173fb@intel.com> Date: Wed, 28 Mar 2018 10:15:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180328165540.648-7-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/28/2018 09:55 AM, Kirill A. Shutemov wrote: > @@ -51,7 +51,7 @@ static inline struct page *new_page_nodemask(struct page *page, > if (PageHighMem(page) || (zone_idx(page_zone(page)) == ZONE_MOVABLE)) > gfp_mask |= __GFP_HIGHMEM; > > - new_page = __alloc_pages_nodemask(gfp_mask, order, > + new_page = __alloc_pages_nodemask(gfp_mask, order, page_keyid(page), > preferred_nid, nodemask); You're not going to like this suggestion. Am I looking at this too superficially, or does every single site into which you pass keyid also take a node and gfpmask and often an order? I think you need to run this by the keepers of page_alloc.c and see if they'd rather do something more drastic.