Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1103263pxu; Mon, 23 Nov 2020 11:42:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC/+gVSX67wsH+hSo9+PQwsdD2Ec57Syywx1739dIXRVbeGlLnwNOMVM1TWal3jjWm+z8p X-Received: by 2002:aa7:d584:: with SMTP id r4mr776565edq.198.1606160554817; Mon, 23 Nov 2020 11:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606160554; cv=none; d=google.com; s=arc-20160816; b=0KTsdqTSfuqTVG4TKwQl+S7IqCByhA31PfdPEV46Y33+BPft/ZAPCwmszJnmk69df1 Msk9W1ae/4m+n1iM9/jJWM0xKaSxeLwVvk1WEJ86PvAOEPKbMfEIV1jWZNaD+fFkViOU D055vRmwO1+fouOzvuPHIvOWutqTZPmfbw1TIhwafNmq1lWc+Jly8E7LzaUf9cSoErjm pcby9KZSrwYf2AsMDXtuwGmrxWzs2OScqX6kxzeCxDppUfLOPWDcXi5q1ApEhWfZDm9C IXv3GHfDdKpmA8d364/bY6Rp3j5diPMzTpLCt9191B9jd1xCP/RjWK37BaLcDPt6iU7G HH5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=aMb4x/GaMSO03n4ViTGHOWqUsr7qcjJScDE05aT1DpE=; b=fBv+XSPN5XPvb8LQsENGohZEjBQzDENbgWRHbdcQUFtlhvKgh5gyLO/bgp2XJVElu3 Mr/Mf4urUrGHHMfKN/qgpNmzRy2fnaYjus2rgt09jlp2Jher/gXd3ZIATDD2bVuK0VKf OMR+9R4jJQPYvaqiO/HhJvSzds/mJ5eeVNYmulma80Ii+/8zmyMyjaNQBlSfseBZnyGf 2Ct6/Xr70L1t20w+Q8vuCtSo/AgmuHAwc8TMxJOETnhtF9tC8xDblzS3nY1ksW16MqN/ VeF15WTfkxeR6douTStQZX+ZPgRpVBMuCq4YzdQ6waZVUNtqblR3Lcj/FeBzvsmjFJZA c1fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ap16si2018515ejc.413.2020.11.23.11.42.11; Mon, 23 Nov 2020 11:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729435AbgKWTkI (ORCPT + 99 others); Mon, 23 Nov 2020 14:40:08 -0500 Received: from shelob.surriel.com ([96.67.55.147]:34044 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728463AbgKWTkI (ORCPT ); Mon, 23 Nov 2020 14:40:08 -0500 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1khHgm-0000JQ-AI; Mon, 23 Nov 2020 14:39:52 -0500 Message-ID: <482cd78039988c1fd8bbc6fd27d366ef8240fd80.camel@surriel.com> Subject: Re: [PATCH 2/2] mm,thp,shm: limit gfp mask to no more than specified From: Rik van Riel To: Michal Hocko Cc: hughd@google.com, xuyu@linux.alibaba.com, akpm@linux-foundation.org, mgorman@suse.de, aarcange@redhat.com, willy@infradead.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, vbabka@suse.cz, Andrey Grodzovsky , Chris Wilson Date: Mon, 23 Nov 2020 14:39:51 -0500 In-Reply-To: <20201119093842.GC12284@dhcp22.suse.cz> References: <20201105191508.1961686-1-riel@surriel.com> <20201105191508.1961686-3-riel@surriel.com> <20201112112242.GA12240@dhcp22.suse.cz> <05f80e300fd4907b99837b5973db8985b7312d3f.camel@surriel.com> <20201119093842.GC12284@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ZaYzvldGh7aMYruBgXCN" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-ZaYzvldGh7aMYruBgXCN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2020-11-19 at 10:38 +0100, Michal Hocko wrote: > On Fri 13-11-20 22:40:40, Rik van Riel wrote: > > On Thu, 2020-11-12 at 12:22 +0100, Michal Hocko wrote: > > > [Cc Chris for i915 and Andray] > > >=20 > > > On Thu 05-11-20 14:15:08, Rik van Riel wrote: > > > > Matthew Wilcox pointed out that the i915 driver > > > > opportunistically > > > > allocates tmpfs memory, but will happily reclaim some of its > > > > pool if no memory is available. > > >=20 > > > It would be good to explicitly mention the requested gfp flags > > > for > > > those > > > allocations. i915 uses __GFP_NORETRY | __GFP_NOWARN, or > > > GFP_KERNEL. > > > Is > > > __shmem_rw really meant to not allocate from highmeme/movable > > > zones? > > > Can > > > it be ever backed by THPs? > >=20 > > You are right, I need to copy the zone flags __GFP_DMA > > through > > __GFP_MOVABLE straight from the limiting gfp_mask > > into the gfp_mask used for THP allocations, and not use > > the default THP zone flags if the caller specifies something > > else. > >=20 > > I'll send out a new version that fixes that. >=20 > Can we make one step back here and actually check whether all this is > actually needed for those shmem users before adding more hacks here > and > there? It doesn't look like that is needed, after all. The i915 driver seems to support having its buffer in highmem, the shmem_pwrite and shmem_pread functions both do kmap/kunmap. --=20 All Rights Reversed. --=-ZaYzvldGh7aMYruBgXCN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl+8EAcACgkQznnekoTE 3oPd6gf+K9bMnqk68rVZ68I36e/78wBXaOu/OpnKOSIt/EI35lRcZvejcl36syMi 61OV+ktbCT06mvNfLW+rPFs2C+0kIhaCbpHHBxrZ/BCqyK1yJpLU0/ga0WJXTKWd uDckzvHWhsjJIU5PknfrPYerOmIzXEwo7AtiK1po+xxuyLhdSW0hsTlf63IJwrLE PrCBhqyjionteIwo3Oa+sZXzLVialNfTy0JAhLyjPfguf0Niv10UNKFHrhKs5ps9 ez1OV4d+0kOXU+ozTqjhOjy1la2YJoKug8N3jcTVyCFDYiOCrDoAglYoWzKDJTot DJ52bJIE4KkIZd8n2fydlpDBuXVVUA== =+auh -----END PGP SIGNATURE----- --=-ZaYzvldGh7aMYruBgXCN--