Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2431327rdh; Sun, 29 Oct 2023 16:23:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoSlDc+XNYaEZDiHt8MX0B8oQss/OsB2lfgasiyOTj/Q3iQ9gUH0LFKCJoRKkWsASnWC36 X-Received: by 2002:a05:6870:6f0d:b0:1e9:badb:acaa with SMTP id qw13-20020a0568706f0d00b001e9badbacaamr10037902oab.23.1698621828513; Sun, 29 Oct 2023 16:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698621828; cv=none; d=google.com; s=arc-20160816; b=PVXQwUFvhD7xBN0RK1/QIDWEHSt7jWQyY6/2EetcKMFVqlvvkIvXEEFQnyhwW9Vf83 zq2RGJ3JPjN0bBkH1ogXgPEgLwWTkdO7Enm8y6hIU3bkhfWDlEyGhTJ9uHXQsK2oExOB N4ATJ6OkezYn11IcRzNfjpW9K1hpvmoBNcOB8jrBx5XfjYyfejOHD33znQ764tg2MH0t 69S6d6N/18XdMaJ2JSA80aH7ZszCKbXN+JJAJCqEqHxwWERD9Osvkb0Z7pm/060ZplaI u61ixmui8ii31bnBKPbIjaDPdkYrSUoekLE05vamGSawN+ZVEsQF9C4OO2wvGNZOFDlq chuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e7NRE5J4yBZqR0H04zSj76mSU3bYxFrKgKvbigz2r28=; fh=ardmABoZqyzAm25ow9fvqe18o8v8L1P0+Wo2I9sPHpg=; b=wtBChlKBe3RwjHv6Hc5ycNZ3IStqAom7A6sKL3EzHWRmpRQmOJfyOPr2BfAO9HvdGo 78lweuVCBRsslilamDmg1Fm6Wic/h8a1ZtU3YKm0IDFeOJ9yrDnSsrH8O+J5srCIT2iy tUzoIxacXa7q2GA7xMKuEJT+8ckXADzlYZMsrsV07cF7z804K3/L4rPvclGnrKPQXaX/ dAZjX/snQZKoGJ4Nqu7Kl2k4SQKZZfIXIHMqzXLpkxOS+5W7/rZ6ppwEDR4rCBMYMEdu rs/iLWjFFJ3J3Yg5dTG6bxYzBgDD/hADcCTduOOSaARxkh0Os32qauN9kPsSUT1c5SIr SpQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Emsjtjrn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s24-20020a656918000000b00578d0b680a8si4009700pgq.824.2023.10.29.16.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 16:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Emsjtjrn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D8374807B99A; Sun, 29 Oct 2023 16:22:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231783AbjJ2XWZ (ORCPT + 99 others); Sun, 29 Oct 2023 19:22:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231848AbjJ2XWL (ORCPT ); Sun, 29 Oct 2023 19:22:11 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211BA121; Sun, 29 Oct 2023 16:17:36 -0700 (PDT) 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=e7NRE5J4yBZqR0H04zSj76mSU3bYxFrKgKvbigz2r28=; b=EmsjtjrntCdnf9uidPLCUElZDB rrLD1wAHhepXZQrvGeOqBYYrY7Tm2+OM6jT7pom/tNGj7AoH891NPoJT8KuPKRh+AQtMYBMCMefDo wm8nGdoeNoLPEYQnXSZMLM15uLPaSqp3IWyB6tnhucTKnq8OkQBIBfEc0M9GdszRLCv6VRvaz7BG+ T1lynS2U8rv14NYjMUt+c7y/24ViXrjkv7SMQGjLsXCBjOxwpQwqezBIlD0j4NLC/6M5emqrwV333 VVXTpXKU77MAEC886DdrahAN0jCoTeiAqivl/OOSPi04RStNzzcwbeuzwXO+omjsHDhBkFnpQpnCg 5VkJ8ejg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qxF28-000e0z-RF; Sun, 29 Oct 2023 23:17:28 +0000 Date: Sun, 29 Oct 2023 23:17:28 +0000 From: Matthew Wilcox To: Daniel Gomez Cc: "minchan@kernel.org" , "senozhatsky@chromium.org" , "axboe@kernel.dk" , "djwong@kernel.org" , "hughd@google.com" , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [RFC PATCH 07/11] shmem: remove huge arg from shmem_alloc_and_add_folio() Message-ID: References: <20230919135536.2165715-1-da.gomez@samsung.com> <20231028211518.3424020-1-da.gomez@samsung.com> <20231028211518.3424020-8-da.gomez@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231028211518.3424020-8-da.gomez@samsung.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 29 Oct 2023 16:22:54 -0700 (PDT) On Sat, Oct 28, 2023 at 09:15:45PM +0000, Daniel Gomez wrote: > The huge flag is already part of of the memory allocation flag (gfp_t). > Make use of the VM_HUGEPAGE bit set by vma_thp_gfp_mask() to know if > the allocation must be a huge page. ... what? > + if (gfp & VM_HUGEPAGE) { Does sparse not complain about this? VM_HUGEPAGE is never part of the GFP flags and there's supposed to be annotations that make the various checkers warn.