public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.com>
To: <jack@suse.cz>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-ext4@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>,
	<yangerkun@huawei.com>, <chengzhihao1@huawei.com>,
	<yukuai3@huawei.com>, <libaokun1@huawei.com>
Subject: [PATCH v3 0/5] quota: fix race condition between dqput() and dquot_mark_dquot_dirty()
Date: Fri, 30 Jun 2023 19:08:17 +0800	[thread overview]
Message-ID: <20230630110822.3881712-1-libaokun1@huawei.com> (raw)

Hello Honza,

This is a solution that uses dquot_srcu to avoid race condition between
dqput() and dquot_mark_dquot_dirty(). I performed a 12+h fault injection
stress test (6 VMs, 4 test threads per VM) and have not found any problems.
And I tested the performance based on the next branch (5c875096d590), this
patch set didn't degrade performance, but rather had a ~5% improvement.

V1->V2:
	Modify the solution to use dquot_srcu.
V2->V3:
	Merge some patches, optimize descriptions.
	Simplify solutions, and fix some spelling errors.

Baokun Li (5):
  quota: factor out dquot_write_dquot()
  quota: rename dquot_active() to inode_quota_active()
  quota: add new helper dquot_active()
  quota: fix dqput() to follow the guarantees dquot_srcu should provide
  quota: simplify drop_dquot_ref()

 fs/quota/dquot.c | 244 ++++++++++++++++++++++++-----------------------
 1 file changed, 125 insertions(+), 119 deletions(-)

-- 
2.31.1


             reply	other threads:[~2023-06-30 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 11:08 Baokun Li [this message]
2023-06-30 11:08 ` [PATCH v3 1/5] quota: factor out dquot_write_dquot() Baokun Li
2023-06-30 11:08 ` [PATCH v3 2/5] quota: rename dquot_active() to inode_quota_active() Baokun Li
2023-06-30 11:08 ` [PATCH v3 3/5] quota: add new helper dquot_active() Baokun Li
2023-06-30 11:08 ` [PATCH v3 4/5] quota: fix dqput() to follow the guarantees dquot_srcu should provide Baokun Li
2023-06-30 11:08 ` [PATCH v3 5/5] quota: simplify drop_dquot_ref() Baokun Li
2023-07-03 17:01 ` [PATCH v3 0/5] quota: fix race condition between dqput() and dquot_mark_dquot_dirty() Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230630110822.3881712-1-libaokun1@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=chengzhihao1@huawei.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox