linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] futex: use wake_up_process() instead of wake_up_state()
@ 2021-03-19  2:59 Wang Qing
  2021-03-19  5:21 ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Qing @ 2021-03-19  2:59 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart, linux-kernel
  Cc: Wang Qing

Using wake_up_process() is more simpler and friendly, 
and it is more convenient for analysis and statistics

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 kernel/futex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index e68db77..078a1f9
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1820,7 +1820,7 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
 
 	q->lock_ptr = &hb->lock;
 
-	wake_up_state(q->task, TASK_NORMAL);
+	wake_up_process(q->task);
 }
 
 /**
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] futex: use wake_up_process() instead of wake_up_state()
  2021-03-19  2:59 [PATCH] futex: use wake_up_process() instead of wake_up_state() Wang Qing
@ 2021-03-19  5:21 ` Mike Galbraith
  2021-03-19  8:53   ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2021-03-19  5:21 UTC (permalink / raw)
  To: Wang Qing, Thomas Gleixner, Ingo Molnar, Peter Zijlstra,
	Darren Hart, linux-kernel

On Fri, 2021-03-19 at 10:59 +0800, Wang Qing wrote:
> Using wake_up_process() is more simpler and friendly,
> and it is more convenient for analysis and statistics

I likely needn't bother, and don't have a NAK to paste on this thing,
but here's another copy of my NOPE for yet another gratuitous change
with complete BS justification.

>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
>  kernel/futex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/futex.c b/kernel/futex.c
> index e68db77..078a1f9
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -1820,7 +1820,7 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
>
>  	q->lock_ptr = &hb->lock;
>
> -	wake_up_state(q->task, TASK_NORMAL);
> +	wake_up_process(q->task);
>  }
>
>  /**


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] futex: use wake_up_process() instead of wake_up_state()
  2021-03-19  5:21 ` Mike Galbraith
@ 2021-03-19  8:53   ` Mike Galbraith
  2021-03-19  9:15     ` 王擎
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Galbraith @ 2021-03-19  8:53 UTC (permalink / raw)
  To: Wang Qing, Thomas Gleixner, Ingo Molnar, Peter Zijlstra,
	Darren Hart, linux-kernel

On Fri, 2021-03-19 at 06:21 +0100, Mike Galbraith wrote:
> On Fri, 2021-03-19 at 10:59 +0800, Wang Qing wrote:
> > Using wake_up_process() is more simpler and friendly,
> > and it is more convenient for analysis and statistics
>
> I likely needn't bother, and don't have a NAK to paste on this thing,
> but here's another copy of my NOPE for yet another gratuitous change
> with complete BS justification.

Let me try a bit softer tone.  I think you're trying to help, but
ignoring feedback is not the way to achieve that goal.  My feedback was
and remains that your change is not an improvement, it's churn, but
more importantly, that changes require technical justification, which
you did not provide.  You were subsequently handed the justification
you lacked by none other than the maintainer of the code you were
modifying.  He told you that your change could become a tiny kernel
size optimization by converting like instances all in one patch.. which
you promptly ignored, instead submitting multiple patches with zero
justification.  That is not the path to success.

>
> >
> > Signed-off-by: Wang Qing <wangqing@vivo.com>
> > ---
> >  kernel/futex.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/futex.c b/kernel/futex.c
> > index e68db77..078a1f9
> > --- a/kernel/futex.c
> > +++ b/kernel/futex.c
> > @@ -1820,7 +1820,7 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
> >
> >  	q->lock_ptr = &hb->lock;
> >
> > -	wake_up_state(q->task, TASK_NORMAL);
> > +	wake_up_process(q->task);
> >  }
> >
> >  /**
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re:Re: [PATCH] futex: use wake_up_process() instead of wake_up_state()
  2021-03-19  8:53   ` Mike Galbraith
@ 2021-03-19  9:15     ` 王擎
  2021-03-19 10:10       ` Mike Galbraith
  0 siblings, 1 reply; 5+ messages in thread
From: 王擎 @ 2021-03-19  9:15 UTC (permalink / raw)
  To: Mike Galbraith
  Cc: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart, linux-kernel


>> On Fri, 2021-03-19 at 10:59 +0800, Wang Qing wrote:
>> > Using wake_up_process() is more simpler and friendly,
>> > and it is more convenient for analysis and statistics
>>
>> I likely needn't bother, and don't have a NAK to paste on this thing,
>> but here's another copy of my NOPE for yet another gratuitous change
>> with complete BS justification.
>
>Let me try a bit softer tone.  I think you're trying to help, but
>ignoring feedback is not the way to achieve that goal.  My feedback was
>and remains that your change is not an improvement, it's churn, but
>more importantly, that changes require technical justification, which
>you did not provide.  You were subsequently handed the justification
>you lacked by none other than the maintainer of the code you were
>modifying.  He told you that your change could become a tiny kernel
>size optimization by converting like instances all in one patch.. which
>you promptly ignored, instead submitting multiple patches with zero
>justification.  That is not the path to success.

Thank you for your reply. There are two reasons for sending patch again. 
One is that I think this is only an improvement in format and has no 
substantial impact, so no verification is required. 
The second one is that I want to hear more opinions from the maintainer. 
Because the entire kernel may have similar problems, I have to figure out 
whether this is a tacit behavior.
Also, I don't understand what you mean by "your change could become a 
tiny kernel size optimization by converting like instances all in one patch".

Thanks,
WangQing.

>
>>
>> >
>> > Signed-off-by: Wang Qing <wangqing@vivo.com>
>> > ---
>> >  kernel/futex.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/kernel/futex.c b/kernel/futex.c
>> > index e68db77..078a1f9
>> > --- a/kernel/futex.c
>> > +++ b/kernel/futex.c
>> > @@ -1820,7 +1820,7 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
>> >
>> >  	q->lock_ptr = &hb->lock;
>> >
>> > -	wake_up_state(q->task, TASK_NORMAL);
>> > +	wake_up_process(q->task);
>> >  }
>> >
>> >  /**
>>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: [PATCH] futex: use wake_up_process() instead of wake_up_state()
  2021-03-19  9:15     ` 王擎
@ 2021-03-19 10:10       ` Mike Galbraith
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Galbraith @ 2021-03-19 10:10 UTC (permalink / raw)
  To: 王擎
  Cc: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart, linux-kernel

On Fri, 2021-03-19 at 17:15 +0800, 王擎 wrote:
> >> On Fri, 2021-03-19 at 10:59 +0800, Wang Qing wrote:
> >> > Using wake_up_process() is more simpler and friendly,
> >> > and it is more convenient for analysis and statistics
> >>
> >> I likely needn't bother, and don't have a NAK to paste on this thing,
> >> but here's another copy of my NOPE for yet another gratuitous change
> >> with complete BS justification.
> >
> >Let me try a bit softer tone.  I think you're trying to help, but
> >ignoring feedback is not the way to achieve that goal.  My feedback was
> >and remains that your change is not an improvement, it's churn, but
> >more importantly, that changes require technical justification, which
> >you did not provide.  You were subsequently handed the justification
> >you lacked by none other than the maintainer of the code you were
> >modifying.  He told you that your change could become a tiny kernel
> >size optimization by converting like instances all in one patch.. which
> >you promptly ignored, instead submitting multiple patches with zero
> >justification.  That is not the path to success.
>
> Thank you for your reply. There are two reasons for sending patch again.
> One is that I think this is only an improvement in format and has no
> substantial impact, so no verification is required.

No substantial impact is not an argument in favor, quite the contrary.

> The second one is that I want to hear more opinions from the maintainer.

The highly qualified opinion Ingo took the time to hand you on a silver
platter was not good enough?  I'm starting to regret being concerned
about having potentially discouraged a potential contributor.

> Because the entire kernel may have similar problems, I have to figure out
> whether this is a tacit behavior.

My obviously misguided concerns just appeared in my rear view mirror.

> Also, I don't understand what you mean by "your change could become a
> tiny kernel size optimization by converting like instances all in one patch".

Go back and read what Ingo wrote.  While at it, read what the other two
maintainers who chimed in had to say before you consider doing any re-
submission.  The low hanging fruit you're trying to pick isn't anywhere
near as juicy as you seem to think it is.

> >>
> >> >
> >> > Signed-off-by: Wang Qing <wangqing@vivo.com>
> >> > ---
> >> >  kernel/futex.c | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/kernel/futex.c b/kernel/futex.c
> >> > index e68db77..078a1f9
> >> > --- a/kernel/futex.c
> >> > +++ b/kernel/futex.c
> >> > @@ -1820,7 +1820,7 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
> >> >
> >> >  	q->lock_ptr = &hb->lock;
> >> >
> >> > -	wake_up_state(q->task, TASK_NORMAL);
> >> > +	wake_up_process(q->task);
> >> >  }
> >> >
> >> >  /**
> >>
> >
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-19 10:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  2:59 [PATCH] futex: use wake_up_process() instead of wake_up_state() Wang Qing
2021-03-19  5:21 ` Mike Galbraith
2021-03-19  8:53   ` Mike Galbraith
2021-03-19  9:15     ` 王擎
2021-03-19 10:10       ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).