Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-25 Thread Bill Huey (hui)
On Sun, Feb 24, 2008 at 10:21 PM, Bill Huey (hui) <[EMAIL PROTECTED]> wrote: > It's probably safe to use, but it's not what its original purpose was > and you should use another function/macro. This is an annotation issue > and your use of it is inconsistent with how it's used in voluntary >

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-25 Thread Bill Huey (hui)
On Sun, Feb 24, 2008 at 10:21 PM, Bill Huey (hui) [EMAIL PROTECTED] wrote: It's probably safe to use, but it's not what its original purpose was and you should use another function/macro. This is an annotation issue and your use of it is inconsistent with how it's used in voluntary preempt.

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-24 Thread Bill Huey (hui)
[repost with all folks CCed] On Sun, Feb 24, 2008 at 9:20 PM, Gregory Haskins <[EMAIL PROTECTED]> wrote: > Are you saying that the modified logic that I introduced is broken? Or > that the original use of the might_sleep() annotation inside this > function is broken? It's probably safe to

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-24 Thread Gregory Haskins
Bill Huey (hui) wrote: The might_sleep is annotation and well as a conditional preemption point for the regular kernel. You might want to do a schedule check there, but it's the wrong function if memory serves me correctly. It's reserved for things that actually are design to sleep. Note that

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-24 Thread Gregory Haskins
Bill Huey (hui) wrote: The might_sleep is annotation and well as a conditional preemption point for the regular kernel. You might want to do a schedule check there, but it's the wrong function if memory serves me correctly. It's reserved for things that actually are design to sleep. Note that

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-24 Thread Bill Huey (hui)
[repost with all folks CCed] On Sun, Feb 24, 2008 at 9:20 PM, Gregory Haskins [EMAIL PROTECTED] wrote: Are you saying that the modified logic that I introduced is broken? Or that the original use of the might_sleep() annotation inside this function is broken? It's probably safe to use,

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Bill Huey (hui)
On Fri, Feb 22, 2008 at 2:20 PM, Gregory Haskins <[EMAIL PROTECTED]> wrote: > Agreed, but it's still correct afaict. I added an extra might_sleep() > to a path that really might sleep. I should have mentioned that in the > header. > > In any case, its moot. Andi indicated this patch is

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Gregory Haskins
Pavel Machek wrote: Hi! Decorate the printk path with an "unlikely()" Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- kernel/rtmutex.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 122f143..ebdaa17 100644 ---

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Pavel Machek
Hi! > Decorate the printk path with an "unlikely()" > > Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> > --- > > kernel/rtmutex.c |8 > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c > index 122f143..ebdaa17 100644 > ---

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Pavel Machek
Hi! Decorate the printk path with an unlikely() Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- kernel/rtmutex.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 122f143..ebdaa17 100644 ---

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Gregory Haskins
Pavel Machek wrote: Hi! Decorate the printk path with an unlikely() Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- kernel/rtmutex.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 122f143..ebdaa17 100644 ---

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-22 Thread Bill Huey (hui)
On Fri, Feb 22, 2008 at 2:20 PM, Gregory Haskins [EMAIL PROTECTED] wrote: Agreed, but it's still correct afaict. I added an extra might_sleep() to a path that really might sleep. I should have mentioned that in the header. In any case, its moot. Andi indicated this patch is probably a

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Gregory Haskins
>>> On Thu, Feb 21, 2008 at 11:36 AM, in message <[EMAIL PROTECTED]>, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Thursday 21 February 2008 16:27:22 Gregory Haskins wrote: > >> @@ -660,12 +660,12 @@ rt_spin_lock_fastlock(struct rt_mutex *lock, >> void fastcall (*slowfn)(struct

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Andi Kleen
On Thursday 21 February 2008 16:27:22 Gregory Haskins wrote: > @@ -660,12 +660,12 @@ rt_spin_lock_fastlock(struct rt_mutex *lock, > void fastcall (*slowfn)(struct rt_mutex *lock)) > { > /* Temporary HACK! */ > - if (!current->in_printk) > - might_sleep(); > -

[PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Gregory Haskins
Decorate the printk path with an "unlikely()" Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- kernel/rtmutex.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 122f143..ebdaa17 100644 --- a/kernel/rtmutex.c +++

[PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Gregory Haskins
Decorate the printk path with an unlikely() Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- kernel/rtmutex.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c index 122f143..ebdaa17 100644 --- a/kernel/rtmutex.c +++

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Gregory Haskins
On Thu, Feb 21, 2008 at 11:36 AM, in message [EMAIL PROTECTED], Andi Kleen [EMAIL PROTECTED] wrote: On Thursday 21 February 2008 16:27:22 Gregory Haskins wrote: @@ -660,12 +660,12 @@ rt_spin_lock_fastlock(struct rt_mutex *lock, void fastcall (*slowfn)(struct rt_mutex *lock))

Re: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition

2008-02-21 Thread Andi Kleen
On Thursday 21 February 2008 16:27:22 Gregory Haskins wrote: @@ -660,12 +660,12 @@ rt_spin_lock_fastlock(struct rt_mutex *lock, void fastcall (*slowfn)(struct rt_mutex *lock)) { /* Temporary HACK! */ - if (!current-in_printk) - might_sleep(); - else