* Re: linux-next: Tree for Jun 28 [ BISECTED: rsyslog/imklog: High CPU usage ]
[not found] ` <20130630181945.GA5171@redhat.com>
@ 2013-07-02 10:15 ` Sedat Dilek
2013-07-02 22:37 ` Oleg Nesterov
0 siblings, 1 reply; 3+ messages in thread
From: Sedat Dilek @ 2013-07-02 10:15 UTC (permalink / raw)
To: Oleg Nesterov
Cc: linux-next, linux-kernel, Stephen Rothwell, Andrew Morton,
Tejun Heo, Daniel Vetter, Imre Deak, Lukas Czerner, Samuel Ortiz,
Wensong Zhang, Simon Horman, Julian Anastasov, Ralf Baechle,
Valdis.Kletnieks, linux-mm
On Sun, Jun 30, 2013 at 8:19 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> Andrew, please drop these
>
> wait-introduce-wait_event_commonwq-condition-state-timeout.patch
> wait-introduce-prepare_to_wait_event.patch
>
> patches again. I'll send v3 although it really looks like I should
> never try to touch wait.h.
>
> On 06/29, Sedat Dilek wrote:
>>
>> As this all did not show me what caused the problem I started a
>> git-bisect session.
>>
>> This revealed the following culprit commit:
>>
>> commit bb1f30cb7d3ba21098f0ee7e0382160ba2599a43
>> "wait: introduce wait_event_common(wq, condition, state, timeout)"
>
> Heh. First of all, I am really sorry.
>
> Not only "__wait_no_timeout(tout) ?:" was wrong, I didn't bother
> to recheck this logic even after I got the "warning: the omitted
> middle operand in ?:" reports.
>
> Sedat, thanks you very much! Any chance you can try the patch below?
>
[ CC linux-mm ML ]
Hi Oleg,
did you made a cleaned-up version?
AFAICS v3, I read that on linux-mm ML, sorry if I ask here in this thread.
Regards,
- Sedat -
> Oleg.
>
>
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -191,12 +191,8 @@ wait_queue_head_t *bit_waitqueue(void *, int);
> for (;;) { \
> __ret = prepare_to_wait_event(&wq, &__wait, state); \
> if (condition) { \
> - __ret = __wait_no_timeout(tout); \
> - if (!__ret) { \
> - __ret = __tout; \
> - if (!__ret) \
> - __ret = 1; \
> - } \
> + __ret = __wait_no_timeout(tout) ? 0 : \
> + (__tout ?: 1); \
> break; \
> } \
> \
> @@ -217,16 +213,10 @@ wait_queue_head_t *bit_waitqueue(void *, int);
> #define wait_event_common(wq, condition, state, tout) \
> ({ \
> long __ret; \
> - if (condition) { \
> - __ret = __wait_no_timeout(tout); \
> - if (!__ret) { \
> - __ret = tout; \
> - if (!__ret) \
> - __ret = 1; \
> - } \
> - } else { \
> + if (condition) \
> + __ret = __wait_no_timeout(tout) ? 0 : ((tout) ?: 1); \
> + else \
> __ret = __wait_event_common(wq, condition, state, tout);\
> - } \
> __ret; \
> })
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: Tree for Jun 28 [ BISECTED: rsyslog/imklog: High CPU usage ]
2013-07-02 10:15 ` linux-next: Tree for Jun 28 [ BISECTED: rsyslog/imklog: High CPU usage ] Sedat Dilek
@ 2013-07-02 22:37 ` Oleg Nesterov
2013-07-03 7:24 ` Sedat Dilek
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2013-07-02 22:37 UTC (permalink / raw)
To: Sedat Dilek
Cc: linux-next, linux-kernel, Stephen Rothwell, Andrew Morton,
Tejun Heo, Daniel Vetter, Imre Deak, Lukas Czerner, Samuel Ortiz,
Wensong Zhang, Simon Horman, Julian Anastasov, Ralf Baechle,
Valdis.Kletnieks, linux-mm
Hi Sedat,
On 07/02, Sedat Dilek wrote:
>
> did you made a cleaned-up version?
> AFAICS v3, I read that on linux-mm ML, sorry if I ask here in this thread.
Yes, I am going to send v3 with this fix + another minor change.
Sorry for delay, I was distracted, will try tomorrow.
Besides, I think Andrew and Stephen need a rest before I try to
break wait.h or the third time.
Oleg.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: Tree for Jun 28 [ BISECTED: rsyslog/imklog: High CPU usage ]
2013-07-02 22:37 ` Oleg Nesterov
@ 2013-07-03 7:24 ` Sedat Dilek
0 siblings, 0 replies; 3+ messages in thread
From: Sedat Dilek @ 2013-07-03 7:24 UTC (permalink / raw)
To: Oleg Nesterov
Cc: linux-next, linux-kernel, Stephen Rothwell, Andrew Morton,
Tejun Heo, Daniel Vetter, Imre Deak, Lukas Czerner, Samuel Ortiz,
Wensong Zhang, Simon Horman, Julian Anastasov, Ralf Baechle,
Valdis.Kletnieks, linux-mm
On Wed, Jul 3, 2013 at 12:37 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> Hi Sedat,
>
> On 07/02, Sedat Dilek wrote:
>>
>> did you made a cleaned-up version?
>> AFAICS v3, I read that on linux-mm ML, sorry if I ask here in this thread.
>
> Yes, I am going to send v3 with this fix + another minor change.
> Sorry for delay, I was distracted, will try tomorrow.
>
> Besides, I think Andrew and Stephen need a rest before I try to
> break wait.h or the third time.
>
Everyone should get a 3rd chance :-).
BTW, dealing with such issues makes me more and more familiar with my
Linux-systems.
- Sedat -
> Oleg.
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-03 7:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CA+icZUXo=Z4gDfCMvLqRQDq_fpNAq+UqtUw=jrU=3=kVZP-2+A@mail.gmail.com>
[not found] ` <20130630181945.GA5171@redhat.com>
2013-07-02 10:15 ` linux-next: Tree for Jun 28 [ BISECTED: rsyslog/imklog: High CPU usage ] Sedat Dilek
2013-07-02 22:37 ` Oleg Nesterov
2013-07-03 7:24 ` Sedat Dilek
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).