Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1475367lqz; Mon, 1 Apr 2024 07:32:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6ZyCF6y9NnMZGcHenyEoMTyx4rdNui3m8pW6OlUWp9aEGfdXPvFoZCHC1mGZrQJQSFkVKjZrfdkd7D7iQYTQGdYU8IAeNd6VE8wdwzQ== X-Google-Smtp-Source: AGHT+IGGswwNu/6UsdUJvY5twfjwizRiN5mVJLlo/pZh8wxxFPjpGV28gi1fdHIYiGnTrBkYZYVW X-Received: by 2002:a17:902:d590:b0:1e2:5237:62df with SMTP id k16-20020a170902d59000b001e2523762dfmr3484949plh.58.1711981933827; Mon, 01 Apr 2024 07:32:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711981933; cv=pass; d=google.com; s=arc-20160816; b=W+gahOPrsFAjX1HBzx1kwa6OP9GMUcgmyWgdkTYohWEWNE6bSROgNwwilVfP89yKu6 ASAI/95586lI6n4P5LoaMarcEmLVxS99TB6jySbhKSNfjpeQHr9g/kIzHelX+B2lTGC7 1j4sdBsD2rdPa/2KeHHeSv5NW5pbB4OWW+5QD09bFpq8AavKbRAhvqI/Aua4MpD2wv7+ wUsFYd5K9co+x3sROwQdULjOi5UZYnG7XkQLe0V4kcNyTVePYX87gdkmQc4nQo3zcdtW GTUrs0nDyzfrnHOukOJYteDUdplSab85xj+kCayS0fk+hn63j1Pbv/1Nmzt+vMohts9q PUfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=1KOTRfdlb96wg3JQvEVXeDDrjwIrXhXgqbZ+oZikD30=; fh=XUiFyxTn3W4gTT6IX7UYDeaBEv9fprXWX/NP5v/IZrg=; b=Do07RdEj0A2jwCCTmjVezxCqRgEqEjobqs6IWLvyuI88sG01kcbI/loGAHYbLvM5pu D75Eg1c2wzSSM/otSBypzJeiEqZFfweo3egmRttlvcUw05UM3QpWPZO+WfuO7Glibj5Z ZBG/Ya+XNyZINx8MPvnrdvOt2wsci9ppRef/tSQ3Ty5MeF1zBhAZpTn7beeDIWTkhSP9 Fq+a/iQD6sdY4JBZvpYmfn3mA0G2yykIxpGfi44dCJBzFSXBa1OTrfkMQaGirScswO8R OTGWKuhczo62IisgOGxCtCjU0fQ9b7kdNm5rPmFeDeFIWg59hjO+2ZhMNZmiFgz4aLMO EAjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Cmzoixu9; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-126746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ju20-20020a170903429400b001dbb6cdf7c3si8652776plb.643.2024.04.01.07.32.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 07:32:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Cmzoixu9; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-126746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 842F7282307 for ; Mon, 1 Apr 2024 14:32:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FA373FE35; Mon, 1 Apr 2024 14:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Cmzoixu9" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14F6F446A0 for ; Mon, 1 Apr 2024 14:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711981922; cv=none; b=Jz7x/AUE6Mpox7WqOxv8LDY+feg59LFyXMi0Ip/3921OHpvjQ+2ct8Sv3OFxImWAdHgXm0sadYS7lnGADI8ihlBGkH1JgRdRCGEJAsYdnaWPFF7uDL2+zA9/86uKZLBVa8enXJGmHraY8A79LGWIbQlwvOoYV2zRJBMLB6aekSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711981922; c=relaxed/simple; bh=1KOTRfdlb96wg3JQvEVXeDDrjwIrXhXgqbZ+oZikD30=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SJAPzQoZkLTU+rgFP7qB9PdvAhrubNjl5zHpCMki9V+ySwvu+GYJ9cxiL00tFlc1JlJK3PgRVy+ztV1lc+PcqSg2I8NnufQh5z1M/gjLcXum3Bl8sR+8BjSItv9fPdhQn0qLJJrpV2zH29Ja4z6djlgtSfsSjNzH+B3a4qDISBo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Cmzoixu9; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4154d38ce9dso187255e9.0 for ; Mon, 01 Apr 2024 07:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711981919; x=1712586719; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1KOTRfdlb96wg3JQvEVXeDDrjwIrXhXgqbZ+oZikD30=; b=Cmzoixu9AMLpk2V/m/xqSRu4jmcW3CLSkFga5nbQa7W9AMmdrReCNkJ8i22vNDY1VO +BtKsJ1Ml4NSFpUVUuSHD4oVrENl0+1FesO1ZskCpk57M66UaS6W/gWxMJ8sf2T14XA3 ZABuPBTT8KjkLw88sHsXRkQH6JoWr3HrmkandYkuoV+IL17xBv/tQKMl9+ChuhuHI51K xXvp/mIwIe4JOL75X+DMUIYIKI5ZaBc1UbCCvN4fApGw7G3Bzdmx7gNFvgYuLaMg4BRF NufAZA9vyJbnZJGcbSvfH2CTsVrJqncvPluAI9P/hdQT1+DdRpELQP9tusSgb+Jc0s6K pMsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711981919; x=1712586719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1KOTRfdlb96wg3JQvEVXeDDrjwIrXhXgqbZ+oZikD30=; b=Q62SaFOyhCkSoTtOgHFqPlO1FGiirgTFcW9n8E9/Q+sNluTJnZINY0wLcKnJjJN8hm wOeVqJlpS/rmhj/GskWxExMcQY39Mxcumh7Nytd2g4+2gB+s8RatjGG0rxU0sOlnPYtD fnphT8RK6JKOcvSSNQApkVi3WsGmA45BjXPrxBXFB92efFMTrV2BMApF42H+JQIpaWrz Ri9Apl+d3zwaVhIQqIY6XcE1qNlFuNZcsd+ViUfP+mYyIR+xBkdRdIlX3Gar/hB1020m Ksd+0rWn+pffxCC30/gN2Rc5EE6JfpTLAC0Wdydj0Jq29psJHHTAcqf8tBQNRqN/kiBL TP7w== X-Forwarded-Encrypted: i=1; AJvYcCWZTRz9JsEm4WB0B5c37ZqT3hgNn5zhHmEXwSZH3yyK63WWFtrTyyqW8lz92MWfzT6cGl/uzKDa8MC2zvVev/XJUQ162I1kRCG/aQq3 X-Gm-Message-State: AOJu0YzMKiNGIG/ef9LpAxfeK9QM66iC/2Hg84wh0noZlgWEPZorQ+pl 4MHhrxBeifpAjG4Tl0LQYJut+qfJZbhN2Esay0hAntEMB2Ap9ONEmtpn8yr9vR5JwY7DwM3sdQP 0a2gl2xhtPDVgOhm1V55HH6AA5UX9Sf5j4XtO X-Received: by 2002:a05:600c:4754:b0:414:7f73:6158 with SMTP id w20-20020a05600c475400b004147f736158mr566112wmo.4.1711981919221; Mon, 01 Apr 2024 07:31:59 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240329073750.20012-1-21cnbao@gmail.com> In-Reply-To: <20240329073750.20012-1-21cnbao@gmail.com> From: Yu Zhao Date: Mon, 1 Apr 2024 10:31:20 -0400 Message-ID: Subject: Re: [PATCH] mm: alloc_anon_folio: avoid doing vma_thp_gfp_mask in fallback cases To: Barry Song <21cnbao@gmail.com> Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Barry Song , Ryan Roberts , Kefeng Wang , John Hubbard , David Hildenbrand , Alistair Popple , Anshuman Khandual , Catalin Marinas , David Rientjes , "Huang, Ying" , Hugh Dickins , Itaru Kitayama , "Kirill A . Shutemov" , Luis Chamberlain , Matthew Wilcox , Vlastimil Babka , Yang Shi , Yin Fengwei , Zi Yan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 29, 2024 at 3:38=E2=80=AFAM Barry Song <21cnbao@gmail.com> wrot= e: > > From: Barry Song > > Fallback rates surpassing 90% have been observed on phones utilizing 64Ki= B > CONT-PTE mTHP. In these scenarios, when one out of every 16 PTEs fails > to allocate large folios, the remaining 15 PTEs fallback. Consequently, > invoking vma_thp_gfp_mask seems redundant in such cases. Furthermore, > abstaining from its use can also contribute to improved code readability. Acked-by: Yu Zhao