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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E186FA3743 for ; Mon, 31 Oct 2022 15:14:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CAA78E0003; Mon, 31 Oct 2022 11:14:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 37A246B0081; Mon, 31 Oct 2022 11:14:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 269FE8E0003; Mon, 31 Oct 2022 11:14:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 02C0A6B0080 for ; Mon, 31 Oct 2022 11:14:29 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A3C01140E6D for ; Mon, 31 Oct 2022 15:14:29 +0000 (UTC) X-FDA: 80081591058.01.824467E Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 03DFB180036 for ; Mon, 31 Oct 2022 15:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=80LEc5METlTsJI8KoiQquV8OxDu+3U/ke9l2V0R/JCs=; b=A9X0/ehust/dGajey3UmClMCit EStnl1d1GSkdAff2iQm72PXUOAhtupS8lrAEhCL6KcDlDyFc0tYvv8c1heOH6f10zNSeFiYNsFfLG d9a3e/pb13lwZv//+mEIGaea0GIS56EikEi7vtcRPr4nO3vEm6K2sH7RmHCc2mGRKFNAVubS4M9wy 1nD0pQdgZ6RvB/6Xh3xNpZip2PstZd1iY28wpTXAU5uhPHRzOnmgBRzq+1jnzzwMw2YK7K0cBGSJh 2T8MJFwWUc2T4WW+cz4hefdocE1ZIrScN6PADGRLo8YinbkfyVrCWV+lwC4wZGbSiRy63vbXTntLe AqpkmuHA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1opWUh-003lpk-IG; Mon, 31 Oct 2022 15:14:31 +0000 Date: Mon, 31 Oct 2022 15:14:31 +0000 From: Matthew Wilcox To: David Howells Cc: linux-mm@kvack.org, Uladzislau Rezki , Dave Chinner , linux-fsdevel@vger.kernel.org, Thomas Gleixner , Ira Weiny , "Fabio M. De Francesco" , Luis Chamberlain Subject: Re: [PATCH 1/1] mm: Add folio_map_local() Message-ID: References: <20221028151526.319681-2-willy@infradead.org> <20221028151526.319681-1-willy@infradead.org> <2557442.1667229098@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2557442.1667229098@warthog.procyon.org.uk> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667229269; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=80LEc5METlTsJI8KoiQquV8OxDu+3U/ke9l2V0R/JCs=; b=18w5OEEx6mYoQ211rmmdAbySCCDmeeYqFBnhQSysHd6CVry5JcYxTRlKy3iXRka2TaHHvH YX11yF/jmHAh9D/g9BIxp3ssB2jFGTzHKavXmAKSVIpvZInDXysR3VmLgAEP9THfvSG0gE v0vJKuh4+t9qwfVh7nKKQXi/0Hu6hqE= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="A9X0/ehu"; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667229269; a=rsa-sha256; cv=none; b=ySytN5Lq5HsifWRF72e5L2nAtH4s6a2P36aw1m37N1qv0BW7yYutN5qiVq/eHPsw/RA9WT 2OIaBECEig8UxiKH5Tt10rJg57Nl+w9odu8qG3Najfi8roGqng2MoIuChxc8H9Dw8PfxlW s57XqvPKd4Cd41lClVoVlS4pB4C2/os= X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 03DFB180036 X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="A9X0/ehu"; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: 4zrys8hcxozu3bmdamxftkinqsweadcn X-HE-Tag: 1667229268-773422 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 Mon, Oct 31, 2022 at 03:11:38PM +0000, David Howells wrote: > Matthew Wilcox (Oracle) wrote: > > > +static inline __must_check void *folio_map_local(struct folio *folio) > > +{ > > + might_alloc(GFP_KERNEL); > > + > > + if (!IS_ENABLED(CONFIG_HIGHMEM)) > > + return folio_address(folio); > > Can you make the might_alloc() contingent on CONFIG_HIGHMEM=y? ... so that 64-bit builds can inadvertently introduce bugs? Either it's safe to do GFP_KERNEL allocations from a given context, or it's not. That's not going to depend on CONFIG_HIGHMEM.