rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: paulmck <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>, rcu <rcu@vger.kernel.org>,
	rostedt <rostedt@goodmis.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>
Subject: Re: Question about list_sort() RCU version.
Date: Tue, 16 Jun 2020 20:45:11 +0000	[thread overview]
Message-ID: <BYAPR04MB4965FFAF956CE124B79ECE84869D0@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 1909772924.4639.1592339084357.JavaMail.zimbra@efficios.com

On 6/16/20 1:24 PM, Mathieu Desnoyers wrote:
> ----- On Jun 16, 2020, at 4:17 PM, Chaitanya Kulkarni Chaitanya.Kulkarni@wdc.com wrote:
> 
>> Hi RCU maintainers and experts,
>>
>> I'm working on a linux kernel upstream project which is in the tree.
>> With the POC I can already see that significant performance improvement
>> with RCU in the fast path which are replacing rw semaphore, but not
>> having list_sort() rcu variant is blocking the developement and getting
>> code upstream.
> 
> Why do you need list_sort() ? Is there any way you could simply insert your
> new elements into the list in already-sorted order ? This would ensure that
> the list is always in a sorted state, which I suspect will be expected by
> RCU readers.
> 
> Thanks,
> 
> Mathieu
> 

It is not expected to be in the order by the readers in this case.

For the list to be populated in sorted order it needs to be traversed 
every time in the fast-path which is costly based on the current design,
so we add it to the tail and sort it later in the work-queue context 
when it is actually needed after we complete the scan. The sorting also
takes care of the stale entries. (kind of entangled).

Changing the design is always the last options, I'm trying to port
the code without having to do that so future users also can user the
RCU list_sort() version, unless having this absolutely not makes any
sense.


> 
>>
>> I was not able to find the such helper implemented for the RCU flavor of
>> list.
>>
>> Can someone provide information about :-
>>
>> 1. Is there any plan to have list_sort_rcu() ? if so when can we expect
>>     that ? (Also how can I help ?)
>>
>> 2. In case there is no plan what are design considerations if someone
>>     wants to implement the code and submit it upstream ?
>>     (Also how can I help here ?


  reply	other threads:[~2020-06-16 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 20:17 Question about list_sort() RCU version Chaitanya Kulkarni
2020-06-16 20:24 ` Mathieu Desnoyers
2020-06-16 20:45   ` Chaitanya Kulkarni [this message]
2020-06-16 21:47 ` Steven Rostedt
2020-06-16 22:26   ` Chaitanya Kulkarni
2020-06-16 22:29   ` Paul E. McKenney
2020-06-16 23:21     ` Chaitanya Kulkarni

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=BYAPR04MB4965FFAF956CE124B79ECE84869D0@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).