From: Andi Kleen <ak@suse.de>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: arjan@infradead.org, eranian@hpl.hp.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86-64 TIF flags for debug regs and io bitmap in ctxsw
Date: Tue, 4 Jul 2006 12:22:42 +0200 [thread overview]
Message-ID: <200607041222.42288.ak@suse.de> (raw)
In-Reply-To: <200607040905.k6495M2l028360@harpo.it.uu.se>
On Tuesday 04 July 2006 11:05, Mikael Pettersson wrote:
> On Tue, 4 Jul 2006 01:14:13 -0700, Stephane Eranian wrote:
> >On Tue, Jul 04, 2006 at 09:51:49AM +0200, Arjan van de Ven wrote:
> >> > - }
> >> > - }
> >> > + if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW))
> >> > + || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP))
> >> > + __switch_to_xtra(prev_p, next_p, tss);
> >>
> >> well isn't this replacing an if() (which isn't cheap but also not
> >> expensive, due to unlikely()) with an atomic operation (which *is*
> >> expensive) ?
> >>
> >Andi is right. I double checked the test_tsk_thread_flag() and it does not
> >use atomic ops.
>
> The test_tsk_thread_flag() does not, but what about all the
> other places in the patch where currently unsychronised loads
> or stores of ->io_bitmap_ptr or ->debugreg7 get replaced or
> extended with locked-on-SMP {set,clear}_{tsk_,}thread_flag()
> operations?
They are all slow paths where it doesn't matter.
-Andi
next prev parent reply other threads:[~2006-07-04 10:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-04 9:05 [PATCH 1/2] x86-64 TIF flags for debug regs and io bitmap in ctxsw Mikael Pettersson
2006-07-04 10:22 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-04 9:20 Mikael Pettersson
2006-07-04 7:28 Stephane Eranian
2006-07-04 7:51 ` Arjan van de Ven
2006-07-04 8:09 ` Andi Kleen
2006-07-04 8:22 ` Arjan van de Ven
2006-07-04 8:10 ` Stephane Eranian
2006-07-04 8:14 ` Stephane Eranian
2006-07-04 8:14 ` Andi Kleen
2006-07-04 8:20 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200607041222.42288.ak@suse.de \
--to=ak@suse.de \
--cc=arjan@infradead.org \
--cc=eranian@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.