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


Groups > linux.kernel > #1542915

Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra()

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra()
Date 2016-12-15 18:30 +0100
Message-ID <sOI0W-9O-25@gated-at.bofh.it> (permalink)
References <sOHoe-87a-13@gated-at.bofh.it> <sOHoe-87a-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 15, 2016 at 8:44 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> -       if (test_tsk_thread_flag(prev_p, TIF_BLOCKSTEP) ^
> -           test_tsk_thread_flag(next_p, TIF_BLOCKSTEP)) {
> +       tifn = task_thread_info(next_p)->flags;
> +       tifp = task_thread_info(prev_p)->flags;

Minor nit, but I think that a sufficiently clever compiler could
interpret this to mean "no one else is modifying these flags, so I can
do clever crazy things".  Wrapping these in READ_ONCE might be
helpful.

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


Thread

[patch 0/3] x86/process: Optimize __switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
  [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
    Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Andy Lutomirski <luto@amacapital.net> - 2016-12-15 18:30 +0100
      Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Thomas Gleixner <tglx@linutronix.de> - 2016-12-16 10:00 +0100
        Re: [patch 2/3] x86/process: Optimize TIF_BLOCKSTEP switch Andy Lutomirski <luto@amacapital.net> - 2016-12-16 20:30 +0100
  [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 17:50 +0100
    Re: [patch 1/3] x86/process: Optimize TIF checks in  switch_to_extra() Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 18:30 +0100
      Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Peter Zijlstra <peterz@infradead.org> - 2016-12-15 18:40 +0100
    Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Andy Lutomirski <luto@amacapital.net> - 2016-12-15 18:30 +0100
    Re: [patch 1/3] x86/process: Optimize TIF checks in switch_to_extra() Peter Zijlstra <peterz@infradead.org> - 2016-12-15 18:30 +0100

csiph-web