Message ID | 20230825135431.1317785-23-hao.xu@linux.dev (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 15B06C71133 for <linux-mm@archiver.kernel.org>; Fri, 25 Aug 2023 14:04:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A8B012800D7; Fri, 25 Aug 2023 10:04:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3B542800D0; Fri, 25 Aug 2023 10:04:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92ABD2800D7; Fri, 25 Aug 2023 10:04:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8399E2800D0 for <linux-mm@kvack.org>; Fri, 25 Aug 2023 10:04:12 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5AA061206BA for <linux-mm@kvack.org>; Fri, 25 Aug 2023 14:04:12 +0000 (UTC) X-FDA: 81162796344.27.4B5D737 Received: from out-245.mta1.migadu.com (out-245.mta1.migadu.com [95.215.58.245]) by imf23.hostedemail.com (Postfix) with ESMTP id 81725140032 for <linux-mm@kvack.org>; Fri, 25 Aug 2023 14:04:10 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=rqq9t63T; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf23.hostedemail.com: domain of hao.xu@linux.dev designates 95.215.58.245 as permitted sender) smtp.mailfrom=hao.xu@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692972250; 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=ZAHRQkTlH3B9Ayy3ByDVW6IFO8x4JKviNIiMKvNnRxw=; b=4EVTJgrWtdD3Ezn6wpxDHhUcRh2a/0aDgKBUlJ8yfPXeWuclmEHLfzoF/sX5/GL4nGdxI4 55wSgZCQzOEoGXW8CfeKuMxMu4eQa1ONCUC4UI0CiWCxEnYpMX++ozKMHF3qqymrbc2//L t6RC1U5cPF3KrO3p5QgLwB/RBG2W6fE= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=rqq9t63T; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf23.hostedemail.com: domain of hao.xu@linux.dev designates 95.215.58.245 as permitted sender) smtp.mailfrom=hao.xu@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692972250; a=rsa-sha256; cv=none; b=STc6nl30EMX4fr7J6VdmkX6kCwavD0epICdzwp2RlMqvckVMWYBN6ppvVubNN0/tcdwRLk nsCEFnEIMQntSTgLSWhXf7RwooXcNOorcZkAdxBXG38SQq4bgK9zlCbUVg4SUf/hrJRKbG /4QmntL49jKhTlRwrz1Z2WTLDLJxoW4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692972248; 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=ZAHRQkTlH3B9Ayy3ByDVW6IFO8x4JKviNIiMKvNnRxw=; b=rqq9t63T1b93nHdvHPb4iPnifbVgNhCPhaGA0/+lVUtdq72oLevGN3oePkSOWgj4tFeMJO 883BuPqR+igY5LuYYZDHjdap5mSmKgc54EL0giqHkQRTPmks0t1/1oKfHQU1t1pMyd2ThX 7baCMPgFPzeqpA42kG/A+w1RFMlPw/c= From: Hao Xu <hao.xu@linux.dev> To: io-uring@vger.kernel.org, Jens Axboe <axboe@kernel.dk> Cc: Dominique Martinet <asmadeus@codewreck.org>, Pavel Begunkov <asml.silence@gmail.com>, Christian Brauner <brauner@kernel.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Stefan Roesch <shr@fb.com>, Clay Harris <bugs@claycon.org>, Dave Chinner <david@fromorbit.com>, "Darrick J . Wong" <djwong@kernel.org>, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-cachefs@redhat.com, ecryptfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-unionfs@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, linux-nilfs@vger.kernel.org, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, Wanpeng Li <wanpengli@tencent.com> Subject: [PATCH 22/29] xfs: comment page allocation for nowait case in xfs_buf_find_insert() Date: Fri, 25 Aug 2023 21:54:24 +0800 Message-Id: <20230825135431.1317785-23-hao.xu@linux.dev> In-Reply-To: <20230825135431.1317785-1-hao.xu@linux.dev> References: <20230825135431.1317785-1-hao.xu@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 81725140032 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: xhx93isuusdtnuoiqmwu1z9pkxp85q5z X-HE-Tag: 1692972250-740529 X-HE-Meta: U2FsdGVkX19aix9Ko4h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5UsuDXR90e1tr8iTjEQAfmAF9aIsBkUR72tN1NAnNalWebJ5wCxMt0z3FHYWleS/+tSXlfWmdJFGmnpDgBpB5u5E8K6HDnPj8yaUsniw/OqvZVOX8vVp7yfHyn9mHgRRO/4rK89Z1kgAgs3rFVynwQghQBXTk9vm07x 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 |
io_uring getdents
|
expand
|
On Fri, Aug 25, 2023 at 09:54:24PM +0800, Hao Xu wrote: > @@ -633,6 +633,8 @@ xfs_buf_find_insert( > * allocate the memory from the heap to minimise memory usage. If we > * can't get heap memory for these small buffers, we fall back to using > * the page allocator. > + * xfs_buf_alloc_kmem may return -EAGAIN, let's not return it but turn > + * to page allocator as well. This new sentence seems like it says exactly the same thing as the previous sentence. What am I missing?
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index eb3cd7702545..57bdc4c5dde1 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -633,6 +633,8 @@ xfs_buf_find_insert( * allocate the memory from the heap to minimise memory usage. If we * can't get heap memory for these small buffers, we fall back to using * the page allocator. + * xfs_buf_alloc_kmem may return -EAGAIN, let's not return it but turn + * to page allocator as well. */ if (BBTOB(new_bp->b_length) >= PAGE_SIZE || xfs_buf_alloc_kmem(new_bp, flags) < 0) {