[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <821822611.7093.1470837893291.JavaMail.zimbra@efficios.com>
Date: Wed, 10 Aug 2016 14:04:53 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Russell King <linux@....linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-api <linux-api@...r.kernel.org>,
Paul Turner <pjt@...gle.com>, Andrew Hunter <ahh@...gle.com>,
Andy Lutomirski <luto@...capital.net>,
Andi Kleen <andi@...stfloor.org>,
Dave Watson <davejwatson@...com>, Chris Lameter <cl@...ux.com>,
Ben Maurer <bmaurer@...com>, rostedt <rostedt@...dmis.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Michael Kerrisk <mtk.manpages@...il.com>,
Boqun Feng <boqun.feng@...il.com>
Subject: Re: [RFC PATCH v7 1/7] Restartable sequences system call
----- On Aug 10, 2016, at 9:33 AM, Peter Zijlstra peterz@...radead.org wrote:
> On Wed, Aug 10, 2016 at 01:26:04PM +0000, Mathieu Desnoyers wrote:
>
>> static bool rseq_update_cpu_id_event_counter(struct task_struct *t)
>> {
>> union rseq_cpu_event u;
>>
>> u.e.cpu_id = raw_smp_processor_id();
>> u.e.event_counter = ++t->rseq_event_counter;
>> if (__put_user(u.v, &t->rseq->u.v))
>> return false;
>> trace_rseq_inc(t->rseq_event_counter);
>
> I had not previously noticed the trace_* muck, but I would suggest
> passing in t and leaving it up to the tracepoint implementation to pick
> out the value.
OK, fixed.
>
> Also, since this not only increments (it also updates the cpu number)
> the naming is 'wrong'.
I'll rename the event to "rseq_update" then, and have two fields:
cpu_id and event_counter.
Thanks,
Mathieu
>
>> return true;
> > }
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Powered by blists - more mailing lists