From: lizhe.67@bytedance.com
To: hch@infradead.org
Cc: akpm@linux-foundation.org, boqun.feng@gmail.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
lizhe.67@bytedance.com, longman@redhat.com, mingo@redhat.com,
peterz@infradead.org, will@kernel.org
Subject: Re: [RFC 1/2] rwsem: introduce upgrade_read interface
Date: Wed, 16 Oct 2024 15:33:40 +0800 [thread overview]
Message-ID: <20241016073340.42565-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <Zw9Hk_9OO-Aqsshc@infradead.org>
On Tue, 15 Oct 2024 21:56:51 -0700, hch@infradead.org wrote:
>On Wed, Oct 16, 2024 at 12:35:59PM +0800, lizhe.67@bytedance.com wrote:
>> From: Li Zhe <lizhe.67@bytedance.com>
>>
>> Introduce a new rwsem interface upgrade_read(). We can call it
>
>It's obviously a try_upgrade_read, right?
Yes, try_upgrade_read is a better name, I will fix it in v2. Thanks!
>
>> +extern int upgrade_read(struct rw_semaphore *sem);
>
>No need for the extern. Also please make any new advanced funtionality
Sorry I don't understand why extern is not needed. If we remove it,
we will encounter the following compilation error:
mm/khugepaged.c:1145:6: error: implicit declaration of function 'upgrade_read'; did you mean 'i_gid_read'? [-Werror=implicit-function-declaration]
if (upgrade_read(&mm->mmap_lock)) {
^~~~~~~~~~~~
>like this an EXPORT_SYMBO_GPL. That is if you actually had a modular
>user, the current one is built-in. (although we could use this in
>XFS if it lands).
I see all advanced functionality in kernel/locking/rwsem.c is tagged with
EXPORT_SYMBOL (which is used in my patch), and I'm not sure if I need to
change it to EXPORT_SYMBO_GPL.
Hope to see this interface used by XFS.
next prev parent reply other threads:[~2024-10-16 7:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 4:35 [RFC 0/2] " lizhe.67
2024-10-16 4:35 ` [RFC 1/2] " lizhe.67
2024-10-16 4:56 ` Christoph Hellwig
2024-10-16 7:33 ` lizhe.67 [this message]
2024-10-16 7:36 ` Christoph Hellwig
2024-10-16 8:00 ` lizhe.67
2024-10-16 8:03 ` Christoph Hellwig
2024-10-16 8:13 ` lizhe.67
2024-10-16 11:51 ` Matthew Wilcox
2024-10-16 12:21 ` Christoph Hellwig
2024-10-16 11:49 ` Matthew Wilcox
2024-10-17 6:23 ` lizhe.67
2024-10-16 14:23 ` Waiman Long
2024-10-16 18:05 ` Matthew Wilcox
2024-10-17 6:46 ` lizhe.67
2024-10-17 15:05 ` Christoph Hellwig
2024-10-17 17:36 ` Waiman Long
2024-10-18 5:06 ` Christoph Hellwig
2024-10-16 4:36 ` [RFC 2/2] khugepaged: use upgrade_read() to optimize collapse_huge_page lizhe.67
2024-10-16 11:53 ` Matthew Wilcox
2024-10-17 6:18 ` lizhe.67
2024-10-17 13:20 ` Matthew Wilcox
2024-10-18 6:37 ` lizhe.67
2024-10-23 7:27 ` kernel test robot
2024-10-16 8:09 ` [RFC 0/2] rwsem: introduce upgrade_read interface Peter Zijlstra
2024-10-16 8:53 ` lizhe.67
2024-10-16 12:10 ` Peter Zijlstra
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=20241016073340.42565-1-lizhe.67@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®