From: Bongkyu Kim <bongkyu7.kim@samsung.com>
To: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
bongkyu7.kim@samsung.com
Subject: Re: [PATCH v2 1/2] Revert "locking/rwsem: Remove reader optimistic spinning"
Date: Wed, 20 Sep 2023 13:09:08 +0900 [thread overview]
Message-ID: <20230920040908.GA4197@KORCO045595.samsungds.net> (raw)
In-Reply-To: <9578a3a7-4151-6b60-3241-d883afe08bc1@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2415 bytes --]
On Wed, Sep 06, 2023 at 09:32:45AM -0400, Waiman Long wrote:
>
> On 9/6/23 07:27, Bongkyu Kim wrote:
> > On Mon, Sep 04, 2023 at 03:56:56PM -0400, Waiman Long wrote:
> > > On 9/4/23 11:10, Peter Zijlstra wrote:
> > > > On Fri, Sep 01, 2023 at 10:07:03AM +0900, Bongkyu Kim wrote:
> > > > > This reverts commit 617f3ef95177840c77f59c2aec1029d27d5547d6.
> > > > >
> > > > > In mobile environment, reader optimistic spinning is still useful
> > > > > because there're not many readers. In my test result at android device,
> > > > > it improves application startup time about 3.8%
> > > > > App startup time is most important factor for android user expriences.
> > > > > So, re-enable reader optimistic spinning by this commit. And,
> > > > > the later patch will make it optional feature by cmdline.
> > > > I'm not seeing any mention on how this interacts with all the rwsem work
> > > > that has been done since that commit, like the handoff rework.
> > > >
> > > > Why is a straight revert a sane thing at this point?
> > > I also agree that a revert is not the best way to reintroduce the feature.
> > > It should document the reason why reader optimistic spinning is not the
> > > default as discussed in commit 617f3ef9517 ("locking/rwsem: Remove reader
> > > optimistic spinning") and under what condition should reader optimistic
> > > spinning can be turned back on.
> > >
> > > Besides, I now think we may not really need 2 separate nonspinnable bits. We
> > > can go with one that is set by writer timing out when spinning on reader.
> > >
> > > Cheers,
> > > Longman
> > Should I modify like the below?
> > - Title to "locking/rwsem: Reintroduce reader optimistic spinning"
> > - Add more document like Longman's comment
> > - Reconsidering about 2 separate nonspinnable bits to one
>
> Besides the above, Peter also ask to verify that it won't affect handoff
> handling which requires that an unlocker see the lock will be free and wake
> up the head of the wait queue. Given the fact that the simple heuristic of
> skipping optimistic spinning if the lock is reader owned is kept, that
> shouldn't be a problem, but you still need to document that.
>
> Cheers,
> Longman
I've been reviewing nonspinnable bits for several days, but I can't find the
way for one spinnable bit. In this patch, how about modify only already mentioned
document part? About one spinnable bit, we will discuss later.
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2023-09-20 4:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230901010734epcas2p4aadced02d68d3db407fda23de34601d2@epcas2p4.samsung.com>
2023-09-01 1:07 ` [PATCH v2 0/2] Make reader optimistic spinning optional Bongkyu Kim
[not found] ` <CGME20230901010734epcas2p1a0d3698e76590637f9175fca40ad9eaf@epcas2p1.samsung.com>
2023-09-01 1:07 ` [PATCH v2 1/2] Revert "locking/rwsem: Remove reader optimistic spinning" Bongkyu Kim
2023-09-04 15:10 ` Peter Zijlstra
2023-09-04 19:11 ` Ingo Molnar
2023-09-04 19:56 ` Waiman Long
2023-09-06 11:27 ` Bongkyu Kim
2023-09-06 13:32 ` Waiman Long
2023-09-20 4:09 ` Bongkyu Kim [this message]
[not found] ` <CGME20230901010734epcas2p1490c6648e41dfddeb0cc9c39a101da8b@epcas2p1.samsung.com>
2023-09-01 1:07 ` [PATCH v2 2/2] locking/rwsem: Make reader optimistic spinning optional Bongkyu Kim
2023-09-04 15:10 ` Peter Zijlstra
2024-04-02 23:46 ` [PATCH v2 0/2] " John Stultz
2024-04-03 1:21 ` Bongkyu Kim
2024-04-03 1:27 ` John Stultz
2024-04-03 1:42 ` Bongkyu Kim
2024-04-04 17:44 ` Waiman Long
2024-04-05 3:06 ` Waiman Long
2024-04-05 6:37 ` Bongkyu Kim
2024-04-05 6:51 ` Bongkyu Kim
2024-04-08 8:15 ` xieliujie
2024-04-09 0:50 ` Bongkyu Kim
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=20230920040908.GA4197@KORCO045595.samsungds.net \
--to=bongkyu7.kim@samsung.com \
--cc=boqun.feng@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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®