All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: lkp@lists.01.org
Subject: Re: [net] 1fbe4b46cac: WARNING: CPU: 0 PID: 2245 at kernel/sched/core.c:7376 __might_sleep+0x8b/0xa8()
Date: Mon, 03 Aug 2015 18:49:58 +0200	[thread overview]
Message-ID: <20150803164958.GA17910@redhat.com> (raw)
In-Reply-To: <20150730212020.GA8185@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

On 07/30, Oleg Nesterov wrote:
>
> Thanks!
>
> I am travelling, I'll send the trivial fix on Monday.
>
> Just in case, this is not a bug, we only need to shut up the warning and we
> even have the special macro for that. I forgot its name, and I don't have the
> kernel sources right now.

Now that I can actually see the code, I think that we should simply remove
__set_current_state(TASK_RUNNING) and set_current_state(TASK_INTERRUPTIBLE).
But let me re-check this once again tomorrow, I simply can't understand why
pktgen_thread_worker() does this.

Unless I am totally confused they could be removed right after ef87979c273a2
"pktgen: better scheduler friendliness" which in particular changed the main
loop to use wait_event(). Then later baac167b "pktgen: avoid expensive
set_current_state() call in loop" changed the 1st __set_current_state() to
set RUNNING, and moved the 2nd set_current_state(TASK_INTERRUPTIBLE) outside
the main loop for absolutely no reason.

Oleg.


WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: kernel test robot <ying.huang@intel.com>
Cc: lkp@01.org, LKML <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [lkp] [net] 1fbe4b46cac: WARNING: CPU: 0 PID: 2245 at kernel/sched/core.c:7376 __might_sleep+0x8b/0xa8()
Date: Mon, 3 Aug 2015 18:49:58 +0200	[thread overview]
Message-ID: <20150803164958.GA17910@redhat.com> (raw)
In-Reply-To: <20150730212020.GA8185@redhat.com>

On 07/30, Oleg Nesterov wrote:
>
> Thanks!
>
> I am travelling, I'll send the trivial fix on Monday.
>
> Just in case, this is not a bug, we only need to shut up the warning and we
> even have the special macro for that. I forgot its name, and I don't have the
> kernel sources right now.

Now that I can actually see the code, I think that we should simply remove
__set_current_state(TASK_RUNNING) and set_current_state(TASK_INTERRUPTIBLE).
But let me re-check this once again tomorrow, I simply can't understand why
pktgen_thread_worker() does this.

Unless I am totally confused they could be removed right after ef87979c273a2
"pktgen: better scheduler friendliness" which in particular changed the main
loop to use wait_event(). Then later baac167b "pktgen: avoid expensive
set_current_state() call in loop" changed the 1st __set_current_state() to
set RUNNING, and moved the 2nd set_current_state(TASK_INTERRUPTIBLE) outside
the main loop for absolutely no reason.

Oleg.


  reply	other threads:[~2015-08-03 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  2:09 [net] 1fbe4b46cac: WARNING: CPU: 0 PID: 2245 at kernel/sched/core.c:7376 __might_sleep+0x8b/0xa8() kernel test robot
2015-07-30 21:20 ` Oleg Nesterov
2015-07-30 21:20   ` [lkp] " Oleg Nesterov
2015-08-03 16:49   ` Oleg Nesterov [this message]
2015-08-03 16:49     ` Oleg Nesterov
2015-08-04 16:31     ` Oleg Nesterov
2015-08-04 16:31       ` [lkp] " Oleg Nesterov

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=20150803164958.GA17910@redhat.com \
    --to=oleg@redhat.com \
    --cc=lkp@lists.01.org \
    /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.