Linux-Fsdevel Archive on lore.kernel.org help / color / mirror / Atom feed
From: Ritesh Harjani <riteshh@linux.ibm.com> To: Hillf Danton <hdanton@sina.com> Cc: linux-ext4@vger.kernel.org, jack@suse.com, tytso@mit.edu, Markus Elfring <Markus.Elfring@web.de>, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Borislav Petkov <bp@alien8.de>, Marek Szyprowski <m.szyprowski@samsung.com>, syzbot+82f324bb69744c5f6969@syzkaller.appspotmail.com Subject: Re: [PATCHv2 1/1] ext4: mballoc: Use this_cpu_read instead of this_cpu_ptr Date: Wed, 10 Jun 2020 07:36:09 +0530 [thread overview] Message-ID: <20200610020610.AEB3211C066@d06av25.portsmouth.uk.ibm.com> (raw) In-Reply-To: <20200609123716.16888-1-hdanton@sina.com> On 6/9/20 6:07 PM, Hillf Danton wrote: > > On Tue, 9 Jun 2020 18:53:23 +0800 Ritesh Harjani wrote: >> >> Simplify reading a seq variable by directly using this_cpu_read API >> instead of doing this_cpu_ptr and then dereferencing it. > > Two of the quick questions > 1) Why can blocks discarded in a ext4 FS help allocators in another? I am not sure if I understand your Q correctly. But here is a brief about the patchset. If there were PA blocks just or about to be discarded by another thread, then the current thread who is doing block allocation should not fail with ENOSPC error instead should be able to allocate those blocks from another thread. The concept is better explained in the commit msgs, if more details are required. Without this patchset (in some heavy multi-threaded use case) allocation was failing when the overall filesystem space available was more then 50%. > > 2) Why is a percpu seqcount prefered over what <linux/seqlock.h> > can offer? > Since this could be a multi-threaded use case, per cpu variable helps in avoid cache line bouncing problem, which could happen when the same variable is updated by multiple threads on different cpus. -ritesh
next parent reply other threads:[~2020-06-10 2:06 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20200609123716.16888-1-hdanton@sina.com> 2020-06-10 2:06 ` Ritesh Harjani [this message] 2020-06-09 10:53 [PATCHv2 1/1] ext4: mballoc: Use this_cpu_read instead of this_cpu_ptr Ritesh Harjani 2020-06-10 6:25 ` Christoph Hellwig 2020-06-10 6:34 ` Ritesh Harjani 2020-06-11 15:03 ` Theodore Y. Ts'o
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=20200610020610.AEB3211C066@d06av25.portsmouth.uk.ibm.com \ --to=riteshh@linux.ibm.com \ --cc=Markus.Elfring@web.de \ --cc=bp@alien8.de \ --cc=hdanton@sina.com \ --cc=jack@suse.com \ --cc=linux-ext4@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=m.szyprowski@samsung.com \ --cc=syzbot+82f324bb69744c5f6969@syzkaller.appspotmail.com \ --cc=tytso@mit.edu \ /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: linkBe 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; as well as URLs for NNTP newsgroup(s).