Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1736796

Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command

From Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command
Date 2017-09-21 17:50 +0200
Message-ID <usbTI-2TP-11@gated-at.bofh.it> (permalink)
References <urcRQ-47U-9@gated-at.bofh.it> <us8Cu-Sx-15@gated-at.bofh.it> <usbqG-2Ji-11@gated-at.bofh.it> <usbAm-2Ne-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


----- On Sep 21, 2017, at 11:27 AM, Paul E. McKenney paulmck@linux.vnet.ibm.com wrote:

> On Thu, Sep 21, 2017 at 03:11:43PM +0000, Mathieu Desnoyers wrote:
>> ----- On Sep 21, 2017, at 8:13 AM, Peter Zijlstra peterz@infradead.org wrote:
>> 
>> > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote:
>> >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool preempt)
>> >>  
>> >>  		/* Also unlocks the rq: */
>> >>  		rq = context_switch(rq, prev, next, &rf);
>> >> +		membarrier_arch_sched_in(prev, next);
>> > 
>> > That's wrong iirc; we just switched stacks, you cannot use @prev and
>> > @next.
>> 
>> Yes, it did indeed explode spectacularly at boot in testing. RFC v3 fixes that.
> 
> Good to hear that there is a useful test.  ;-)

For the issue identified by PeterZ, just booting the machine was enough to
touch a task_struct after it was put, which exploded. After fixing this, I
ran through the membarrier selftests: they run fine.

Then I did a test branch for liburcu [1] which uses the private cmd with
registration. Both 'make check' and 'make regtest' run fine on Power8.

Thanks,

Mathieu

[1] https://github.com/compudj/userspace-rcu-dev/tree/test-urcu-reg-priv

> 
>							Thanx, Paul
> 
>> Thanks,
>> 
>> Mathieu
>> 
>> 
>> > 
>> >>  	} else {
>> >>  		rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP);
>> > >  		rq_unlock_irq(rq, &rf);
>> 
>> --
>> Mathieu Desnoyers
>> EfficiOS Inc.
>> http://www.efficios.com

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH v2 1/2] membarrier: Provide register expedited private command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-19 00:40 +0200
  [RFC PATCH 2/2] membarrier: selftest: Test private expedited cmd Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-19 00:40 +0200
  Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited  private command Peter Zijlstra <peterz@infradead.org> - 2017-09-21 14:20 +0200
    Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited  private command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-21 17:20 +0200
      Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited  private command "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-21 17:30 +0200
        Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited  private command Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-09-21 17:50 +0200

csiph-web