Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200169

Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()
Date 2015-08-04 19:20 +0200
Message-ID <pTO2B-9e-1@gated-at.bofh.it> (permalink)
References <pTNpV-7C4-27@gated-at.bofh.it> <pTNzB-7Ny-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/04, Marcelo Ricardo Leitner wrote:
>
> On Tue, Aug 04, 2015 at 06:33:34PM +0200, Oleg Nesterov wrote:
> > Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop
> > code in pktgen_thread_worker()" removed (in particular) the final
> > __set_current_state(TASK_RUNNING) and I didn't notice the previous
> > set_current_state(TASK_INTERRUPTIBLE). This triggers the warning
> > in __might_sleep() after return.
> >
> > Afaics, we can simply remove both set_current_state()'s, and we
> > could do this a long ago right after ef87979c273a2 "pktgen: better
> > scheduler friendliness" which changed pktgen_thread_worker() to
> > use wait_event_interruptible_timeout().
> >
> > Reported-by: Huang Ying <ying.huang@intel.com>
> > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
>
> Interesting that it didn't happen in my tests yet per description it
> should have. Huang, did you do anything special to trigger this?

Do you have CONFIG_DEBUG_ATOMIC_SLEEP=y ?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net: pktgen: don't abuse current->state in  pktgen_thread_worker() Oleg Nesterov <oleg@redhat.com> - 2015-08-04 18:40 +0200
  Re: [PATCH] net: pktgen: don't abuse current->state in  pktgen_thread_worker() Marcelo Ricardo Leitner <mleitner@redhat.com> - 2015-08-04 18:50 +0200
    Re: [PATCH] net: pktgen: don't abuse current->state in  pktgen_thread_worker() Oleg Nesterov <oleg@redhat.com> - 2015-08-04 19:20 +0200
      Re: [PATCH] net: pktgen: don't abuse current->state in  pktgen_thread_worker() Marcelo Ricardo Leitner <mleitner@redhat.com> - 2015-08-04 19:40 +0200
  Re: [PATCH] net: pktgen: don't abuse current->state in  pktgen_thread_worker() David Miller <davem@davemloft.net> - 2015-08-07 09:00 +0200

csiph-web