public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <871tfqqtuy.fsf@yhuang-dev.intel.com>
2015-07-30 21:20 ` [lkp] [net] 1fbe4b46cac: WARNING: CPU: 0 PID: 2245 at kernel/sched/core.c:7376 __might_sleep+0x8b/0xa8() Oleg Nesterov
2015-08-03 16:49   ` Oleg Nesterov [this message]
2015-08-04 16:31     ` 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=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=ying.huang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox