Message ID | 20241114152743.2381672-6-axboe@kernel.dk (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 C3B0ED68B30 for <linux-mm@archiver.kernel.org>; Thu, 14 Nov 2024 15:28:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1283C6B0096; Thu, 14 Nov 2024 10:28:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0FDF06B0098; Thu, 14 Nov 2024 10:28:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6B0F6B0099; Thu, 14 Nov 2024 10:28:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C46256B0096 for <linux-mm@kvack.org>; Thu, 14 Nov 2024 10:28:10 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 72782ACDC2 for <linux-mm@kvack.org>; Thu, 14 Nov 2024 15:28:10 +0000 (UTC) X-FDA: 82785080700.04.0965E2D Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by imf19.hostedemail.com (Postfix) with ESMTP id 17A2F1A0011 for <linux-mm@kvack.org>; Thu, 14 Nov 2024 15:27:12 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=v3XLxXS2; spf=pass (imf19.hostedemail.com: domain of axboe@kernel.dk designates 209.85.161.50 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731597852; 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=jvfAlDie45/dO/q2Oa4nMUlSYRbUQddnQckYeJvFoiA=; b=2tL/CR5yd0Wp1P0YI4R9P+K7DutFonCf3irZneYyWgqXOi865+xW9PId9zBzr8ioQMIBAG 9wbwrnl9NZvWRInbHXAkC3ISILOCAXAmIfFpWIE08eCNkON5ieJyb8ivESBXen/6Fz3chD LsUJAsDGPFe0ls/WFVFVtWmQrOtWbY4= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=v3XLxXS2; spf=pass (imf19.hostedemail.com: domain of axboe@kernel.dk designates 209.85.161.50 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731597852; a=rsa-sha256; cv=none; b=yVUcwGpeCsfvSuywO4Yp3wTt4cTo1OkobrHh8i05JD0c/gjcJ/gldRbi1Qm3Lvr+l85Tlt o5TkRdgRm8rGfx3H1rdKYzJIWESlm6BrPUsdAxBdD6B/lF0K9189Iw2Iwprnsoiaslr1U3 SuvAxq+55j/1mzu/jgOk3I5udns6DfM= Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5ebc0e13d25so280195eaf.1 for <linux-mm@kvack.org>; Thu, 14 Nov 2024 07:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1731598087; x=1732202887; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jvfAlDie45/dO/q2Oa4nMUlSYRbUQddnQckYeJvFoiA=; b=v3XLxXS2AreOR+TbtneqfI4QdQs+0Dmi5JdMvEJzP63mdqXyWvfmO4dYWxKWQrU21Z 28ZHtZTRG6cGvk2rttVUqE4WgcblVkAAX05Xu6FmOgrjXdMQqMz4TrFqtUF6iV0tAs3I wjyfbW0hKdqw0Ubq78J8PGBGqHDrXAVVe97pVjIMYxIyFztWza6gJRSYYL1+jY5lobl7 SS5R/q+njDHzO83nU5/X1hbQ4GnzruzVtycDVCjJ91tt9B+AnGSFKCi1KwINFbE96CSD v7fzex6rK4SnjpMO7Kl4+LiBi4hokvu5nQmxJUVcdFjmOGeBiUqYMtLehbk6o4WXUoVw dCwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731598087; x=1732202887; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jvfAlDie45/dO/q2Oa4nMUlSYRbUQddnQckYeJvFoiA=; b=hjz7YKJWGEAtcHJb8RU2QCVTN3MNt4DU62On5jyEg76scqY1jvMj/7bOdEkAC85OZz xZ731KcX72gFxJh2gbUe0icUbZlQkCsHcKuIgpNAEagX2Ht1sN7I6tPgyq56YiYRmZR5 W0sV0qegs6XCSIlXAqIl8rh5z7vi0snh3j3mQ4mOR5WjnwnsyZQGt7ECffAZzg1hSdVD ObKL4BDUvv4GbJY7sBALt41Z2payGKMkOPEpUMELaegsp5BvKFS/6ksPwZpvhctuZpQm w6l4HKOvFCVWk23dOcUyb6Ya4QiyvfrKLlJQbfYYPvjM9IkSe8M/tS4uMLAg192W6ebk xbyA== X-Gm-Message-State: AOJu0Yws1k3Bipd1kTsphYttJp9ItEkB3arJm0HKu4qOQU3Ss4BQv/RA +ZHCjoXC4ujwRCCKAFn9me6a4mbhhvEY6mSaVc0T2GPdS/2S7TbxhNT276AfC2gjJvBIFrA5MOk QESA= X-Google-Smtp-Source: AGHT+IH7eepGaxoKX7XFVQSCKcZ5tiiQfUtPjwDWCbNdm4JNlvZQy9y+41dOTUM8EVcPpq30RA+88A== X-Received: by 2002:a05:6820:278c:b0:5ee:710:83fa with SMTP id 006d021491bc7-5ee922a81aemr6235784eaf.8.1731598087197; Thu, 14 Nov 2024 07:28:07 -0800 (PST) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5eea026eb41sm368250eaf.39.2024.11.14.07.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 07:28:06 -0800 (PST) From: Jens Axboe <axboe@kernel.dk> To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: hannes@cmpxchg.org, clm@meta.com, linux-kernel@vger.kernel.org, willy@infradead.org, kirill@shutemov.name, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, bfoster@redhat.com, Jens Axboe <axboe@kernel.dk> Subject: [PATCH 04/17] mm/readahead: add readahead_control->uncached member Date: Thu, 14 Nov 2024 08:25:08 -0700 Message-ID: <20241114152743.2381672-6-axboe@kernel.dk> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114152743.2381672-2-axboe@kernel.dk> References: <20241114152743.2381672-2-axboe@kernel.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 17A2F1A0011 X-Stat-Signature: 76psnsc4a78gf1raxjpfxgxto341ghat X-Rspam-User: X-HE-Tag: 1731598032-993269 X-HE-Meta: U2FsdGVkX19rbghYfoWiOMtqTU5b8PHbNG14G6hiOCHpRKe5u9kPuuRgA6ZvUQja2Ddlt0XoDFKvdnwxX0uSfNm3+md+OG5k0zqYC93101wfw+TNDySSrCMwNA9jtGM/q1AH1qgib9R7PbzJkhDl6VMlFlLWj4fxlknko3+lDcYm1AycSXQARfD1X/fq27CynDdvnausAnzjdNVGikK1EOXxEA2QvFCzD6fskJaehnmNybEqUe/unh3k6qvaQXCKMwZ0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Wjd5H/brmM9nNPl8YBlUw85cxDZ8TuUbx329YFDJNVifnJk1evkseGYh6TojhaN8yRxZmFjUQT685qKzxgyUlAZJ9Z4syxylJ9DZ/AMCqKk1m5rZM+MA== 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Uncached buffered IO
|
expand
|
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 68a5f1ff3301..8afacb7520d4 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1350,6 +1350,7 @@ struct readahead_control { pgoff_t _index; unsigned int _nr_pages; unsigned int _batch_count; + bool uncached; bool _workingset; unsigned long _pflags; }; diff --git a/mm/readahead.c b/mm/readahead.c index 003cfe79880d..8dbeab9bc1f0 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -191,7 +191,13 @@ static void read_pages(struct readahead_control *rac) static struct folio *ractl_alloc_folio(struct readahead_control *ractl, gfp_t gfp_mask, unsigned int order) { - return filemap_alloc_folio(gfp_mask, order); + struct folio *folio; + + folio = filemap_alloc_folio(gfp_mask, order); + if (folio && ractl->uncached) + __folio_set_uncached(folio); + + return folio; } /**
If ractl->uncached is set to true, then folios created are marked as uncached as well. Signed-off-by: Jens Axboe <axboe@kernel.dk> --- include/linux/pagemap.h | 1 + mm/readahead.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)