Received: by 10.213.65.68 with SMTP id h4csp1484182imn; Thu, 29 Mar 2018 05:40:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZCO8pGHztRTFhTcIijUWlVy9eOyqKA5WUkBO7OY1Xa0ByHtPTaHULFhTxMWF75ZiPriRf X-Received: by 10.99.146.30 with SMTP id o30mr5473910pgd.115.1522327229358; Thu, 29 Mar 2018 05:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522327229; cv=none; d=google.com; s=arc-20160816; b=TEGB8E/LvQ9cLBc1uVIYsVii5adQp5guBHsyPP8ncexjyly/h5OAf0yxTMD/I5WraG ytlG2D5B2QIR57v8qVUN2eULRsKCAyhjEMQr4chsWfSeRLZND2PQZk2mbgI7I6pDNf3g JaeyvSQqa+eUpyYdA9UMPOQ8WGxWAJDxt2vWJT8eEFIJCo1fo2RSBT4Aigaj52jhnXOr Q/M4LXYKl4EL+WcGJfCL+LJ4hZ7TmRs9SMkL3SGKqFPLernRX/vLmXxKwCPFNfQ6h/ko Voo/26bS81u24T1loS+PGdnlALUj9b1dmZ15l6+pzUmOufRdjolCYq9JLAbep8wF2lEi a9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=PqBvp+24dwpHgy4xsxOTEyLNbabzHfOBhueYee+qLjA=; b=vv/XsmKI4w9mMGPDyV34N0xiU6cMGnDqF+ftdj2hRzmHVCbBhFYPqM+a30vC+WB702 zOzeNRHZcjmVULszW+n9lIZe/EWYq6dbt/g3Ey893FEITpQTE7Z+SAOR+oWhpcgldhf4 IDppuYzZVXTF86rT//UfciJO7+9uBdfxHbGOvMjiJ7h3giwWQwJs9UwF5XtIcOXxn/kc PH4cc1ScT8DQi8FbCljj42SdPY4TXnGb1y06XBi/Qf7eJF9dV7Mz57X8KdOPZwTJXU2X cpSLlC2DcA01H8uUdOS73aDoevmZ+UcnE56mbWzxHTtCykSH2uQMWsrOF12+9o9kqmS0 6+6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=H4BeMgwA; 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 o1-v6si5744541plb.459.2018.03.29.05.40.15; Thu, 29 Mar 2018 05:40:29 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=H4BeMgwA; 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 S1752496AbeC2MjI (ORCPT + 99 others); Thu, 29 Mar 2018 08:39:08 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:39562 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbeC2MjG (ORCPT ); Thu, 29 Mar 2018 08:39:06 -0400 Received: by mail-wm0-f53.google.com with SMTP id f125so11292616wme.4 for ; Thu, 29 Mar 2018 05:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PqBvp+24dwpHgy4xsxOTEyLNbabzHfOBhueYee+qLjA=; b=H4BeMgwARXEhEBQt+Xz6vMiJPugeDtEg+b4uSpBBmlgrhoGbyldrqTH3lg2r5MFaGw oshBN1E2MdPibLxG1IH0Qs3d3v5+csf3t7qFmymPgzjz9kSfX9IcvIqhAHLH/GadlG/V eMHxQi1Upt2jAVblZIlPZV8Y1+nh8hs1Bjhs+XqcdZ99JrrnWwRgtGjglgI9qyC0dlIJ Npxy3wZ/9Rwua7QUA603WYNuiU678nD+LQ4efHun64I5tCwe3tfPcCcAUe7ZtOc6aTBk 46+vIHGKdx6y2UqWnFGVuUC3gxGmNS6XWNhMROw2dPnieH5ATKib/5Bzj5AjdANvLK0h Yz3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PqBvp+24dwpHgy4xsxOTEyLNbabzHfOBhueYee+qLjA=; b=rkAQaQz1J/p23+HMn5f2CHApZzEDUibvr1yFaxpfw2JJDQGiroXhx578SBqJJ0eCH0 0U7ldxTL2s1/t7zacng240/pwmP7y41gdv0seCSoRNE9GI53+cLuXz12STwDr4s9KjzO IB1z6zYQWHSsEaqNtUDogMXPaVRnmj+XBJWPt4SreYFXzPUIef/GnDEG/ybq2LOTaMSU XNTAYu9fqp+qAuioA8YLPSlH3/wmS5okMxTYHSAkxV7i1XdONNn0a47gYeQKQyNhotXR b3vfYgd+AXIhWaZW5tjsA53DyB9iXf6Irt/veHi7v/RYS4Xih+Xxv041IOhHCCbreHJ7 rYjw== X-Gm-Message-State: AElRT7FU+8CmF73DjtFxY7/ieuY1/u7p5TRUsmZg2kOsDXWKlb/IJJQ9 Zu7jLRYTgdBzb/ePlhSf0URydA== X-Received: by 10.80.220.73 with SMTP id y9mr7185050edk.176.1522327145546; Thu, 29 Mar 2018 05:39:05 -0700 (PDT) Received: from node.shutemov.name ([178.124.220.81]) by smtp.gmail.com with ESMTPSA id t4sm3962047edt.33.2018.03.29.05.39.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 05:39:04 -0700 (PDT) Received: by node.shutemov.name (Postfix, from userid 1000) id 94569648D520; Thu, 29 Mar 2018 15:38:29 +0300 (+03) Date: Thu, 29 Mar 2018 15:38:29 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv2 06/14] mm/page_alloc: Propagate encryption KeyID through page allocator Message-ID: <20180329123829.jnwmmdtt2py32d7j@node.shutemov.name> References: <20180328165540.648-1-kirill.shutemov@linux.intel.com> <20180328165540.648-7-kirill.shutemov@linux.intel.com> <5d334638-2139-07a1-c999-36a1729173fb@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d334638-2139-07a1-c999-36a1729173fb@intel.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 28, 2018 at 10:15:02AM -0700, Dave Hansen wrote: > 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. Are you talking about having some kind of struct that would indicalte page allocation context -- gfp_mask + order + node + keyid? -- Kirill A. Shutemov