lkml.org 
[lkml]   [2015]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] context_tracking,x86: remove extraneous irq disable & enable from context tracking on syscall entry

* Andy Lutomirski <luto@amacapital.net> wrote:

> > on return from idle we'd do:
> >
> > rcu_qs_ctr += 4-2+1; /* Register QS, clear bit 1, set bit 0 */
> >
> > etc. On all boundary transitions we can use a constant ADD on a
> > suitable percpu variable.
>
> Sounds good to me, except that we need to be careful to distinguish
> between non-syscall entries from quiescent states
> and non-syscall entries from quiescent states.

It might be hard to make that distinction! ;-)

I suspect you wanted to raise the issue of various contexts nesting on
each other, such as syscall triggering a page fault, which gets an irq
nested, etc. - versus non-nested contexts such as user-space
triggering a page fault or user-space getting an irq?

> [...] We could save the old state (as the current exception_enter
> code does) or we could allocate enough low bits for the state that
> the problem goes away.

So I think, if it all works in practice just as well as it does in
email, we might be better off with more state bits: that would tell
any remote statistics/sampling code more as well.

It might also be easier to patch in/out, because this kind of state
tracking will affect non-RT CPUs as well. (Later on we could do a
separate IDT for RT CPUs as well, with a patched version of the entry
code.)

> I don't think the TIF_RCU_QS variant is worthwhile -- merging the
> counter and state is probably both easier and faster.

Yeah.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-05-08 15:41    [W:0.118 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site