Message ID | 20230915183848.1018717-17-kernel@pankajraghav.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F405FEED61E for <linux-mm@archiver.kernel.org>; Fri, 15 Sep 2023 18:39:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C37FE6B03CC; Fri, 15 Sep 2023 14:39:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72A606B03D2; Fri, 15 Sep 2023 14:39:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DF3A6B03CD; Fri, 15 Sep 2023 14:39:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 93BE96B03CC for <linux-mm@kvack.org>; Fri, 15 Sep 2023 14:39:42 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6C1B1C07C8 for <linux-mm@kvack.org>; Fri, 15 Sep 2023 18:39:42 +0000 (UTC) X-FDA: 81239695404.25.2FBC76A Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by imf24.hostedemail.com (Postfix) with ESMTP id AE8D618000D for <linux-mm@kvack.org>; Fri, 15 Sep 2023 18:39:40 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=flQNjUny; spf=pass (imf24.hostedemail.com: domain of me@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=me@pankajraghav.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694803180; a=rsa-sha256; cv=none; b=T+hgn3Yieeqso57uYAg4PXK1hciln4L29RRrU824j3wHEc4OfiwK0Bu31GU7ksyEGF6nPI kEbuiBqTj1tPkCIh7gT53ehNo7tFSIuUdGOg8DvaE6TSil0qC5tRTs8peX3ZF5kEBN1SL7 fA4skqU/CFlVc+luSrtffpq6EC9+07A= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=pankajraghav.com header.s=MBO0001 header.b=flQNjUny; spf=pass (imf24.hostedemail.com: domain of me@pankajraghav.com designates 80.241.56.172 as permitted sender) smtp.mailfrom=me@pankajraghav.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694803180; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iOYqPSu+oVCOd89+RaAtiuAgqa7oaErhDOx7o0+X38E=; b=dqy5wzFKzux89fsjMcS8ttmkPJqzhMQACqLS0UvgNZ6NBEx3yqVqSBDBxfEmj+5e5jhH2D ZVlbwSwoLL3tXfijmw9mvKFD4LMJW45OOLQvVczW9ljAhgj9SArfPxy1S1lhDicWQzBlg/ vv4KcokH1REq55mQVD3/rmglHrdPGdc= Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.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-202.mailbox.org (Postfix) with ESMTPS id 4RnNJn36Rwz9sbW; Fri, 15 Sep 2023 20:39:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1694803177; 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=iOYqPSu+oVCOd89+RaAtiuAgqa7oaErhDOx7o0+X38E=; b=flQNjUnyU25W7ZGoZco4mDtUzalhwJdm/Bip/rbg2I7G+1AE2WK86hUhNm9re8XYQltTbW Q1UDpffAJOx5HxpxhTPWaT+BSJpH86ccESygaGzrHRoAl5a6HWVXDBTEyaXOGrB36BUlFJ UJidHKi+CEgQGEa5bx3L4Zay4lNQkQrS+WRXtZcwIJXqP8EAA8xyZ7WjuimYFHT6oowESq Fo+uCzgXisnLoV5PFAOd1As8LnA3i8F2vc9tZxxok3KJTKvhHophEy6lJ04F5KBoY0aNft 1ZXo8HQVFMQ3CahHpKra2M7qoAf4kdCWBLeQrGgqKkHiklzRWbTaCAql3Y6Xfw== 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 16/23] readahead: add folio with at least mapping_min_order in page_cache_ra_order Date: Fri, 15 Sep 2023 20:38:41 +0200 Message-Id: <20230915183848.1018717-17-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-Server: rspam08 X-Rspamd-Queue-Id: AE8D618000D X-Stat-Signature: rngo3owc8bduf7i1uipkwdjhh67516z9 X-Rspam-User: X-HE-Tag: 1694803180-914093 X-HE-Meta: U2FsdGVkX19G5IrPBf2b6liJQ4CoYNwPDs+o5WITqH5Ki05I8absHamXW4aeiEycaabW+p5FqLFGznX5x0kFDy1eewcImkWMF3fHekbRXY+qnvCD9lEUIQAxc/UUuvW4Q3CcPbx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TPg0v7rtNZYXsmqStB4dFAAoDbEKBXgvckbdaeSgqpXOSzsF/lWOtTsidQT98ww6W503szQepOQ+O14KLqpKjKaZnRNuJy242vC7P0eXlaKeEPeMRr40FnUmNkyhjKAyFrCWQNMLTaWHAkB8Jfril1u5jRKKBEN9aI/Yn9CzENwDPDoGthzaDxMs= 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: <linux-mm.kvack.org> |
Series |
Enable block size > page size in XFS
|
expand
|
diff --git a/mm/readahead.c b/mm/readahead.c index 838dd9ca8dad..fb5ff180c39e 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -506,6 +506,7 @@ void page_cache_ra_order(struct readahead_control *ractl, { struct address_space *mapping = ractl->mapping; pgoff_t index = readahead_index(ractl); + unsigned int min_order = mapping_min_folio_order(mapping); pgoff_t limit = (i_size_read(mapping->host) - 1) >> PAGE_SHIFT; pgoff_t mark = index + ra->size - ra->async_size; int err = 0; @@ -535,10 +536,16 @@ void page_cache_ra_order(struct readahead_control *ractl, order = 0; } /* Don't allocate pages past EOF */ - while (index + (1UL << order) - 1 > limit) { + while (order > min_order && index + (1UL << order) - 1 > limit) { if (--order == 1) order = 0; } + + if (order < min_order) + order = min_order; + + VM_BUG_ON(index & ((1UL << order) - 1)); + err = ra_alloc_folio(ractl, index, mark, order, gfp); if (err) break;