From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BF0FC47098 for ; Fri, 4 Jun 2021 09:47:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E42C86023E for ; Fri, 4 Jun 2021 09:47:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E42C86023E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i6dGk3hdy58N1Xaa1po4eKqb5dEX+/yOkqIJfGvla/E=; b=rbtA1DfPEfBW7w rPLFCDUSoBCIWuqQAqj/g3AXFPzDMXIt/KYAroYruIwUXAyQaEI2tZBI7IQ7WWYM0KyMSs6yLcKjI afR4YxGr57uv3tWWMVGfGuDW9ryQbYxNKZwAfaZZgam54e0UavIcandvwPkxNqKXcJ2Hos19sd5OH FoQSF+pWGW69IqeAFXGd5vbyugqUBys4QT7IBKRHddT3W6nEZvGJK/0yAJUXF7TkmPbXXzWt3GAnb M9QLZHxlz+kGl/dOmrF+4u/yIdQwvEhoSh4p5phCqIi7r8PN/UDC/dJDJ0INu3jWhARdzEAktVP0x 7G8BM1keeddcTSk9HSUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lp6Ow-00CiR1-QU; Fri, 04 Jun 2021 09:46:03 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lp6Ol-00CiOy-Sw for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 09:45:55 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D4B6E61402; Fri, 4 Jun 2021 09:45:49 +0000 (UTC) Date: Fri, 4 Jun 2021 10:45:47 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Andrey Konovalov , Alexander Potapenko , Vincenzo Frascino , Andrew Morton , Jann Horn , Evgenii Stepanov , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 1/4] mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable() Message-ID: <20210604094546.GA31173@arm.com> References: <20210602235230.3928842-1-pcc@google.com> <20210602235230.3928842-2-pcc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210602235230.3928842-2-pcc@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210604_024551_990437_697E6CD9 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 02, 2021 at 04:52:27PM -0700, Peter Collingbourne wrote: > In an upcoming change we would like to add a flag to > GFP_HIGHUSER_MOVABLE so that it would no longer be an OR > of GFP_HIGHUSER and __GFP_MOVABLE. This poses a problem for > alloc_zeroed_user_highpage_movable() which passes __GFP_MOVABLE > into an arch-specific __alloc_zeroed_user_highpage() hook which ORs > in GFP_HIGHUSER. > > Since __alloc_zeroed_user_highpage() is only ever called from > alloc_zeroed_user_highpage_movable(), we can remove one level > of indirection here. Remove __alloc_zeroed_user_highpage(), > make alloc_zeroed_user_highpage_movable() the hook, and use > GFP_HIGHUSER_MOVABLE in the hook implementations so that they will > pick up the new flag that we are going to add. > > Signed-off-by: Peter Collingbourne > Link: https://linux-review.googlesource.com/id/Ic6361c657b2cdcd896adbe0cf7cb5a7fbb1ed7bf Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEE3BC07E94 for ; Fri, 4 Jun 2021 09:46:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8BD8161402 for ; Fri, 4 Jun 2021 09:46:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BD8161402 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 014F16B0036; Fri, 4 Jun 2021 05:46:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F05636B006C; Fri, 4 Jun 2021 05:46:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA5FB6B006E; Fri, 4 Jun 2021 05:46:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0118.hostedemail.com [216.40.44.118]) by kanga.kvack.org (Postfix) with ESMTP id A89AF6B0036 for ; Fri, 4 Jun 2021 05:46:04 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2E5A18020B37 for ; Fri, 4 Jun 2021 09:46:04 +0000 (UTC) X-FDA: 78215560248.19.F65B6B9 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP id 664EFC01C09F for ; Fri, 4 Jun 2021 09:45:38 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D4B6E61402; Fri, 4 Jun 2021 09:45:49 +0000 (UTC) Date: Fri, 4 Jun 2021 10:45:47 +0100 From: Catalin Marinas To: Peter Collingbourne Cc: Andrey Konovalov , Alexander Potapenko , Vincenzo Frascino , Andrew Morton , Jann Horn , Evgenii Stepanov , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 1/4] mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable() Message-ID: <20210604094546.GA31173@arm.com> References: <20210602235230.3928842-1-pcc@google.com> <20210602235230.3928842-2-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210602235230.3928842-2-pcc@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of cmarinas@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=cmarinas@kernel.org; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 664EFC01C09F X-Stat-Signature: i11rzbkytyxs6rqhknzqesqcwz8jkuyx X-HE-Tag: 1622799938-829353 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 02, 2021 at 04:52:27PM -0700, Peter Collingbourne wrote: > In an upcoming change we would like to add a flag to > GFP_HIGHUSER_MOVABLE so that it would no longer be an OR > of GFP_HIGHUSER and __GFP_MOVABLE. This poses a problem for > alloc_zeroed_user_highpage_movable() which passes __GFP_MOVABLE > into an arch-specific __alloc_zeroed_user_highpage() hook which ORs > in GFP_HIGHUSER. > > Since __alloc_zeroed_user_highpage() is only ever called from > alloc_zeroed_user_highpage_movable(), we can remove one level > of indirection here. Remove __alloc_zeroed_user_highpage(), > make alloc_zeroed_user_highpage_movable() the hook, and use > GFP_HIGHUSER_MOVABLE in the hook implementations so that they will > pick up the new flag that we are going to add. > > Signed-off-by: Peter Collingbourne > Link: https://linux-review.googlesource.com/id/Ic6361c657b2cdcd896adbe0cf7cb5a7fbb1ed7bf Acked-by: Catalin Marinas