* Re: some thoughts about TSC based delay_tsc()
[not found] ` <20071121192754.GA22769@elte.hu>
@ 2007-11-21 20:06 ` Marin Mitov
2007-11-21 20:09 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Marin Mitov @ 2007-11-21 20:06 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel
On Wednesday 21 November 2007 09:27:54 pm you wrote:
> * Marin Mitov <mitov@issp.bas.bg> wrote:
> > Hi Ingo,
> >
> > The patch is quite good ;-) but we forget when it is needed :-( In
> > fact we need it only for PREEMPT SMP kernels - it could hurt PREEMPT
> > UP kernels (no migration possible), so no need for
> > preempt_disable()/preempt_enable().
> >
> > In short the old version of delay_tsc() is good for UP kernels and NON
> > PREEMPT SMP kernels too.
>
> please reply to the public list, so that discussions do not get lost.
>
> i dont think there's any problem: udelay() is about _wasting_ cycles -
> it's what drivers use for short delays.
Sure for the thread executing udelay(), but not for the other ready threads
which should also wait till preempt_enable() to grab the same cpu even
for PREEMPT (UP or SMP) kernels (or I misunderstand something?).
Marin
>
> Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: some thoughts about TSC based delay_tsc()
2007-11-21 20:06 ` some thoughts about TSC based delay_tsc() Marin Mitov
@ 2007-11-21 20:09 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2007-11-21 20:09 UTC (permalink / raw)
To: Marin Mitov; +Cc: linux-kernel
* Marin Mitov <mitov@issp.bas.bg> wrote:
> On Wednesday 21 November 2007 09:27:54 pm you wrote:
> > * Marin Mitov <mitov@issp.bas.bg> wrote:
> > > Hi Ingo,
> > >
> > > The patch is quite good ;-) but we forget when it is needed :-( In
> > > fact we need it only for PREEMPT SMP kernels - it could hurt
> > > PREEMPT UP kernels (no migration possible), so no need for
> > > preempt_disable()/preempt_enable().
> > >
> > > In short the old version of delay_tsc() is good for UP kernels and
> > > NON PREEMPT SMP kernels too.
> >
> > please reply to the public list, so that discussions do not get lost.
> >
> > i dont think there's any problem: udelay() is about _wasting_ cycles -
> > it's what drivers use for short delays.
>
> Sure for the thread executing udelay(), but not for the other ready
> threads which should also wait till preempt_enable() to grab the same
> cpu even for PREEMPT (UP or SMP) kernels (or I misunderstand
> something?).
on non-PREEMPT kernels there's no real difference between old and and
new code because the kernel is not preemptible. So we can use the new
code unconditionally.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-21 20:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200711212057.10465.mitov@issp.bas.bg>
[not found] ` <20071121192754.GA22769@elte.hu>
2007-11-21 20:06 ` some thoughts about TSC based delay_tsc() Marin Mitov
2007-11-21 20:09 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®