public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.4.10pre7aa1
@ 2001-09-11  8:51 Dipankar Sarma
  2001-09-11 11:04 ` 2.4.10pre7aa1 Andrea Arcangeli
  0 siblings, 1 reply; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-11  8:51 UTC (permalink / raw)
  To: hch; +Cc: linux-kernel, Paul Mckenney, Andrea Arcangeli

Hi Christoph,

In article <20010910205250.B22889@caldera.de> you wrote:

> Hmm, I don't see why latency is important for rcu - we only want to
> free datastructures.. (mm load?).

While it is not important for RCU to do the updates quickly, it is
still necessary that updates are not completely starved out by
high-priority tasks. So, the idea behind using high-priority
krcuds is to ensure that they don't get starved thereby delaying
updates for unreasonably long periods of time which could lead
to memory pressure or other performance problems depending on
how RCU is being used. 


> On the other hands they are the experts on RCU, not I so I'll believe them.

>> So in short if you really are in pain for 8k per cpu to get the best
>> runtime behaviour and cleaner code I'd at least suggest to use the
>> ksoftirqd way that should be the next best step.

> My problem with this appropech is just that we use kernel threads for
> more and more stuff - always creating new ones.  I think at some point
> they will sum up badly.

> 	Christoph

I agree that it is not always a good idea to use kernel threads for
everything, but in this case this seems to be the safest and
most reasonable option.

FYI, there are a couple of other implementations, but they all affect
code in fast paths even if there is no RCU going on in the system.
One of them is from Rusty that keeps track of CPUs going through
quiescent state from the scheduler context and also executes the
callbacks from the scheduler context. The other patch is based
on our old DYNIX/ptx implementation - it uses one per-cpu context
switch counter to detect quiescent state and checks for completion
of RCU in local timer interrupt handler. Once all the CPUs go
through a quiescent state, the callbacks are processed using
a tasklet. 

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: 2.4.10pre7aa1
@ 2001-09-11  9:39 Maneesh Soni
  2001-09-11 11:12 ` 2.4.10pre7aa1 Andrea Arcangeli
  0 siblings, 1 reply; 32+ messages in thread
From: Maneesh Soni @ 2001-09-11  9:39 UTC (permalink / raw)
  To: andrea; +Cc: LKML


In article <20010910200344.C714@athlon.random> you wrote:
> Long term of course, but with my further changes before the inclusion
> the plain current patches shouldn't apply any longer, I'd like if the
> developers of the current rcu fd patches could check my changes and
> adapt them (if they agree with my changes of course ;).

Hello Andrea,

I have noted your changes and I am modifying the FD patch accordingly. In fact
in the first version of FD patch I have used the rc_callback() interface which
equivalent to call_rcu(). 

Regards,
Maneesh

-- 
Maneesh Soni
IBM Linux Technology Center,
IBM India Software Lab, Bangalore.
Phone: +91-80-5262355 Extn. 3999
email: smaneesh@sequent.com
http://lse.sourceforge.net/locking/rclock.html

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: 2.4.10pre7aa1
@ 2001-09-11 11:53 Dipankar Sarma
  2001-09-11 11:57 ` 2.4.10pre7aa1 Andrea Arcangeli
  0 siblings, 1 reply; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-11 11:53 UTC (permalink / raw)
  To: andrea; +Cc: linux-kernel, Paul Mckenney

In article <20010911131238.N715@athlon.random> you wrote:
> many thanks. At the moment my biggest concern is about the need of
> call_rcu not to be starved by RT threads (keventd can be starved so then
> it won't matter if krcud is RT because we won't start using it).

> Andrea

I think we can avoid keventd altogether by using a periodic timer (say 10ms)
to check for completion of an RC update. The timer may be active
only if only if there is any RCU going on in the system - that way
we still don't have any impact on the rest of the kernel.

I am working on such a thing - but it will take me a little bit
of time to figure out how to do this in linux.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: 2.4.10pre7aa1
@ 2001-09-11 12:22 Dipankar Sarma
  0 siblings, 0 replies; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-11 12:22 UTC (permalink / raw)
  To: andrea; +Cc: linux-kernel, Paul Mckenney

In article <20010911135735.T715@athlon.random> you wrote:
> On Tue, Sep 11, 2001 at 05:23:01PM +0530, Dipankar Sarma wrote:
>> In article <20010911131238.N715@athlon.random> you wrote:
>> > many thanks. At the moment my biggest concern is about the need of
>> > call_rcu not to be starved by RT threads (keventd can be starved so then
>> > it won't matter if krcud is RT because we won't start using it).
>> 
>> > Andrea
>> 
>> I think we can avoid keventd altogether by using a periodic timer (say 10ms)
>> to check for completion of an RC update. The timer may be active
>> only if only if there is any RCU going on in the system - that way
>> we still don't have any impact on the rest of the kernel.

> the timer can a have bigger latency than keventd calling wait_for_rcu
> so it should be a loss in a stright bench with light load, but OTOH we
> only care about getting those callbacks executed eventually and the
> advantage I can see is that the timer cannot get starved.

> Andrea

What kind of timer latencies are we talking about ? I would not be
too concerned if the RCU timers execute in 40ms instead of requested
10ms. The question is are there situations where they can get delayed
by minutes ?

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: 2.4.10pre7aa1
@ 2001-09-11 13:05 Dipankar Sarma
  2001-09-11 13:56 ` 2.4.10pre7aa1 Andrea Arcangeli
  0 siblings, 1 reply; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-11 13:05 UTC (permalink / raw)
  To: alan; +Cc: Paul Mckenney, Andrea Arcangeli, linux-kernel

In article <E15gmqD-0002YK-00@the-village.bc.nu> you wrote:
>> BTW, I fixed a few more issues in the rcu patch (grep for
>> down_interruptible for instance), here an updated patch (will be
>> included in 2.4.10pre8aa1 [or later -aa]) with the name of rcu-2.

> I've been made aware of one other isue with the RCU patch
> US Patent #05442758

> In the absence of an actual real signed header paper patent use grant for GPL 
> usage from the Sequent folks that seems to be rather hard to fix.

> Alan

Hi Alan,

IBM bought us a couple of years ago and linux RCU is an IBM approved 
project. I am not sure I understand what exactly is needed for patent use 
grant for GPL, but whatever it is, I see absolutely no problem getting it done.
I would appreciate if you let me know what is needed for GPL.

Thanks
Dipankar 
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread
[parent not found: <20010910175416.A714@athlon.random>]
* Re: 2.4.10pre7aa1
@ 2001-09-12 11:04 Dipankar Sarma
  2001-09-12 14:03 ` 2.4.10pre7aa1 Andrea Arcangeli
  0 siblings, 1 reply; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-12 11:04 UTC (permalink / raw)
  To: rusty; +Cc: Andrea Arcangeli, linux-kernel, Paul Mckenney

In article <20010912182440.3975719b.rusty@rustcorp.com.au> you wrote:
> On Mon, 10 Sep 2001 17:54:17 +0200
> Andrea Arcangeli <andrea@suse.de> wrote:
>> Only in 2.4.10pre7aa1: 00_rcu-1
>> 
>> 	wait_for_rcu and call_rcu implementation (from IBM). I did some
>> 	modifications with respect to the original version from IBM.
>> 	In particular I dropped the vmalloc_rcu/kmalloc_rcu, the
>> 	rcu_head must always be allocated in the data structures, it has
>> 	to be a field of a class, rather than hiding it in the allocation
>> 	and playing dirty and risky with casts on a bigger allocation.

> Hi Andrea, 

> 	Like the kernel threads approach, but AFAICT it won't work for the case of two CPUs running wait_for_rcu at the same time (on a 4-way or above).

The patch I submitted to Andrea had logic to make sure that
two CPUs don't execute wait_for_rcu() at the same time.
Somehow it seems to have got lost in Andrea's modifications.

I will look at that and submit a new patch to Andrea, if necessary.

As for wrappers, I am agnostic. However, I think sooner or later
people will start asking for them, if we go by our past experience.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: 2.4.10pre7aa1
@ 2001-09-17  9:13 Dipankar Sarma
  0 siblings, 0 replies; 32+ messages in thread
From: Dipankar Sarma @ 2001-09-17  9:13 UTC (permalink / raw)
  To: riel; +Cc: Andrea Arcangeli, linux-kernel

In article <Pine.LNX.4.33L.0109161433530.9536-100000@imladris.rielhome.conectiva> you wrote:
> On Sun, 16 Sep 2001, Andrea Arcangeli wrote:

>> However the issue with keventd and the fact we can get away with a
>> single per-cpu counter increase in the scheduler fast path made us to
>> think it's cleaner to just spend such cycle for each schedule rather
>> than having yet another 8k per cpu wasted and longer taskslists (a
>> local cpu increase is cheaper than a conditional jump).

> So why don't we put the test+branch inside keventd ?

> wakeup_krcud(void)
> {
> 	krcud_wanted = 1;
> 	wakeup(&keventd);
> }

> cheers,

> Rik
> -- 

keventd is not suitable for RCU at all. It can get starved out by RT
threads and that can result in either memory pressure or performance
degradation depending on how RCU is being used.

I have a patch that uses a per-cpu quiescent state counter. Cost of 
this on schedule() path is one per-cpu counter increment. I will
mail out the patch as soon as I can complete testing Andrea's review
comments on a bigger SMP box.

Most impartantly :-) it doesn't use kernel threads.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2001-09-17  9:09 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-11  8:51 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 11:04 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 12:40   ` 2.4.10pre7aa1 Alan Cox
2001-09-11 13:49     ` 2.4.10pre7aa1 Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2001-09-11  9:39 2.4.10pre7aa1 Maneesh Soni
2001-09-11 11:12 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 11:53 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 11:57 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 12:22 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 13:05 2.4.10pre7aa1 Dipankar Sarma
2001-09-11 13:56 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-11 14:27   ` 2.4.10pre7aa1 Dipankar Sarma
     [not found] <20010910175416.A714@athlon.random>
2001-09-10 17:41 ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 18:03   ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 18:49     ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:01       ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 19:03         ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:08           ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-10 18:52     ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-10 19:06       ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 17:00         ` 2.4.10pre7aa1 Rik van Riel
2001-09-16 17:23           ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 17:34             ` 2.4.10pre7aa1 Rik van Riel
2001-09-16 18:16               ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 19:04             ` 2.4.10pre7aa1 Christoph Hellwig
2001-09-12  8:24 ` 2.4.10pre7aa1 Rusty Russell
2001-09-12 11:04 2.4.10pre7aa1 Dipankar Sarma
2001-09-12 14:03 ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-12 14:42   ` 2.4.10pre7aa1 Dipankar Sarma
2001-09-12 14:53     ` 2.4.10pre7aa1 Andrea Arcangeli
2001-09-16 12:23       ` 2.4.10pre7aa1 Rusty Russell
2001-09-17  9:13 2.4.10pre7aa1 Dipankar Sarma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox