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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D83CAC63777 for ; Mon, 23 Nov 2020 19:40:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B52C20727 for ; Mon, 23 Nov 2020 19:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B52C20727 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 74D066B005D; Mon, 23 Nov 2020 14:40:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D8186B006E; Mon, 23 Nov 2020 14:40:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C57F6B0070; Mon, 23 Nov 2020 14:40:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 2CFF26B005D for ; Mon, 23 Nov 2020 14:40:09 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BFFE71EE6 for ; Mon, 23 Nov 2020 19:40:08 +0000 (UTC) X-FDA: 77516698896.20.chess56_4d125b727368 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 96E8E180C07AB for ; Mon, 23 Nov 2020 19:40:08 +0000 (UTC) X-HE-Tag: chess56_4d125b727368 X-Filterd-Recvd-Size: 3898 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Nov 2020 19:40:08 +0000 (UTC) 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 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: --=-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--