Message ID | 20230915183848.1018717-15-kernel@pankajraghav.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1466763vqi; Fri, 15 Sep 2023 21:07:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSPCSQFUzCzFH5Yzz7wDVtbj0YVMqCjeNXU+DarSiYy0GF13irYwcXDVgPdM/1y+SjQ+0u X-Received: by 2002:a05:6a21:3b48:b0:153:d71f:cd21 with SMTP id zy8-20020a056a213b4800b00153d71fcd21mr4173477pzb.49.1694837265747; Fri, 15 Sep 2023 21:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694837265; cv=none; d=google.com; s=arc-20160816; b=EsOsxI//A7g6bG0itQmPoiT77s/91kMf7pwbvXNVYNiFcG6SP79F28in287BthEeJc cYdBx70tHwZnIoCGH/u8U6LWWPy1988/ZzlOHp0ao9Xn/rR+qTsuG5CFLsAZzrZpOgTO UwA06NSfvjf9pKVDja6tEPndvSkFKrPaPeGMs3Qls6FzTODNCTukZPXqZIBgUaJ7a6M0 nB7+jFBaD1cemZtn5BkF6mqyNOwPVjH/+oC1gj4ca8mGz+CQHXkI5YSRrHtYbIziC2F7 kGABgpAsY7SFBB1+UdurTggw+eJ/FuwW1fOKP8ZbyL7NaGJjSMQnQhlMguy5bZaBlEb0 7fsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=591wcX/aNYK1i2+Gpz2G47nBurFy4yzLeb3z8BH/s7c=; fh=kl+S4GAUWD1kOeoqBopscteh2mu3DZslcHc01dOJ6TI=; b=jiJPPiF5uWVpxZePgiyVLJ1gH61lx8N/rQRUCABQX+4TuTPBM9AEIPS31/cBasaZJ7 jJzQn3vDOdC0Vf0CsdhMnFX6m7mqMhr6xNo79zTPhhukuL+xcI+UTdORXZQmWWaCC4VG YaPsBGanJsCdgSfq8acEDCTyWOzRj4towJJlWoOqFPLQpXfL7igyJ9rptsKEjP6AJQ+y N58AaoF+JX/9WXei9Cgnggk7oHpJPvnPhtukyiaDsxYxIj3agraJz/pvdpxkwrs3XE5Z bjjF79IR/4I+1+qKot2ZC2LrJdvlnD9zYZhnDOiTttJllM92p1Cf9oTDCYULIbhJ275T cwaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=vcPcMUF6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f3-20020a17090ac28300b0026360db339fsi4291633pjt.12.2023.09.15.21.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 21:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=vcPcMUF6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 383C68026AEC; Fri, 15 Sep 2023 11:42:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236835AbjIOSmL (ORCPT <rfc822;ruipengqi7@gmail.com> + 30 others); Fri, 15 Sep 2023 14:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236825AbjIOSlp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 14:41:45 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A344206; Fri, 15 Sep 2023 11:40:22 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RnNJg0GXfz9spB; Fri, 15 Sep 2023 20:39:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1694803171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=591wcX/aNYK1i2+Gpz2G47nBurFy4yzLeb3z8BH/s7c=; b=vcPcMUF61bQ2Sox+rVmcmmFCT5EqJKJRSDzMWuT3qx6Cthz50vAI4MWCBIJ+/FXhvQQT73 aUeCtC3yGQQ9yF6AYkBBl/xbuC7mwlJcI6rdrJUfFIxTR6mKGWW+d8riBrqwJycp2FTOK+ rSdoOS7Y9ZY2iIqkKtC/1Mzz0BmkWZt3aY7oRXjFsQGGWCf7vZNYfMMwkyXPXqdMYBuSqv YshJdlp/P1VfVHttkHmJg2rDfDIzV5tFlpdaI9rPLXUlzcICnaqjt1ipzU55sAxa6mse0B f3qJ8/OF95BjLF3LDOCPsStttf1OOn3/f/YPMTzUtd/kfRx+XXvz7QdxF3gFbA== From: Pankaj Raghav <kernel@pankajraghav.com> To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: p.raghav@samsung.com, david@fromorbit.com, da.gomez@samsung.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, willy@infradead.org, djwong@kernel.org, linux-mm@kvack.org, chandan.babu@oracle.com, mcgrof@kernel.org, gost.dev@samsung.com Subject: [RFC 14/23] readahead: allocate folios with mapping_min_order in ra_unbounded() Date: Fri, 15 Sep 2023 20:38:39 +0200 Message-Id: <20230915183848.1018717-15-kernel@pankajraghav.com> In-Reply-To: <20230915183848.1018717-1-kernel@pankajraghav.com> References: <20230915183848.1018717-1-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4RnNJg0GXfz9spB X-Spam-Status: No, score=-0.9 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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 11:42:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777165680906753163 X-GMAIL-MSGID: 1777165680906753163 |
Series |
Enable block size > page size in XFS
|
|
Commit Message
Pankaj Raghav (Samsung)
Sept. 15, 2023, 6:38 p.m. UTC
From: Pankaj Raghav <p.raghav@samsung.com> Allocate folios with mapping_min_order order in page_cache_ra_unbounded(). Also adjust the accounting to take the folio_nr_pages in the loop. Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> --- mm/readahead.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/readahead.c b/mm/readahead.c index 5c4e7ee64dc1..2a9e9020b7cf 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -250,7 +250,8 @@ void page_cache_ra_unbounded(struct readahead_control *ractl, continue; } - folio = filemap_alloc_folio(gfp_mask, 0); + folio = filemap_alloc_folio(gfp_mask, + mapping_min_folio_order(mapping)); if (!folio) break; if (filemap_add_folio(mapping, folio, index + i, @@ -264,7 +265,8 @@ void page_cache_ra_unbounded(struct readahead_control *ractl, if (i == nr_to_read - lookahead_size) folio_set_readahead(folio); ractl->_workingset |= folio_test_workingset(folio); - ractl->_nr_pages++; + ractl->_nr_pages += folio_nr_pages(folio); + i += folio_nr_pages(folio) - 1; } /*