From: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Petr Mladek <pmladek-IBi9RG/b67k@public.gmane.org>
Cc: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
"Paul E. McKenney"
<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>,
Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
Vlastimil Babka <vbabka-AlSwsSmVLrQ@public.gmane.org>,
live-patching-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark
Date: Mon, 7 Sep 2015 19:49:14 +0200 [thread overview]
Message-ID: <20150907174914.GA2148@redhat.com> (raw)
In-Reply-To: <20150904093856.GI22739-KsEp0d+Q8qECVLCxKZUutA@public.gmane.org>
Sorry, I didn't read these emails, and I never looked at this code...
Can't understand what are you talking about but a minor nit anyway ;)
On 09/04, Petr Mladek wrote:
>
> + __set_current_state(TASK_RUNNING);
> if (!kthread_should_stop())
> wait_to_die();
I bet this wait_to_die() can die, consumer/producer can simply exit.
Just you need get_task_struct() after kthread_create(), and put_task_struct()
after kthread_stop().
Oleg.
WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Borislav Petkov <bp@suse.de>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
live-patching@vger.kernel.org, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark
Date: Mon, 7 Sep 2015 19:49:14 +0200 [thread overview]
Message-ID: <20150907174914.GA2148@redhat.com> (raw)
In-Reply-To: <20150904093856.GI22739@pathway.suse.cz>
Sorry, I didn't read these emails, and I never looked at this code...
Can't understand what are you talking about but a minor nit anyway ;)
On 09/04, Petr Mladek wrote:
>
> + __set_current_state(TASK_RUNNING);
> if (!kthread_should_stop())
> wait_to_die();
I bet this wait_to_die() can die, consumer/producer can simply exit.
Just you need get_task_struct() after kthread_create(), and put_task_struct()
after kthread_stop().
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>
WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Borislav Petkov <bp@suse.de>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
live-patching@vger.kernel.org, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer in the benchmark
Date: Mon, 7 Sep 2015 19:49:14 +0200 [thread overview]
Message-ID: <20150907174914.GA2148@redhat.com> (raw)
In-Reply-To: <20150904093856.GI22739@pathway.suse.cz>
Sorry, I didn't read these emails, and I never looked at this code...
Can't understand what are you talking about but a minor nit anyway ;)
On 09/04, Petr Mladek wrote:
>
> + __set_current_state(TASK_RUNNING);
> if (!kthread_should_stop())
> wait_to_die();
I bet this wait_to_die() can die, consumer/producer can simply exit.
Just you need get_task_struct() after kthread_create(), and put_task_struct()
after kthread_stop().
Oleg.
next prev parent reply other threads:[~2015-09-07 17:49 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 14:39 [RFC PATCH 00/14] kthread: Use kthread worker API more widely Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 01/14] kthread: Allow to call __kthread_create_on_node() with va_list args Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 02/14] kthread: Add create_kthread_worker*() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 03/14] kthread: Add drain_kthread_worker() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
[not found] ` <1438094371-8326-4-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org>
2015-07-28 17:18 ` Tejun Heo
2015-07-28 17:18 ` Tejun Heo
2015-07-28 17:18 ` Tejun Heo
[not found] ` <20150728171822.GA5322-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-07-29 10:04 ` Petr Mladek
2015-07-29 10:04 ` Petr Mladek
2015-07-29 10:04 ` Petr Mladek
[not found] ` <20150729100457.GI2673-KsEp0d+Q8qECVLCxKZUutA@public.gmane.org>
2015-07-29 15:03 ` Tejun Heo
2015-07-29 15:03 ` Tejun Heo
2015-07-29 15:03 ` Tejun Heo
2015-07-28 14:39 ` [RFC PATCH 04/14] kthread: Add destroy_kthread_worker() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 05/14] kthread: Add wakeup_and_destroy_kthread_worker() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
[not found] ` <1438094371-8326-6-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org>
2015-07-28 17:23 ` Tejun Heo
2015-07-28 17:23 ` Tejun Heo
2015-07-28 17:23 ` Tejun Heo
2015-07-28 14:39 ` [RFC PATCH 06/14] kthread: Add kthread_worker_created() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
[not found] ` <1438094371-8326-7-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org>
2015-07-28 17:26 ` Tejun Heo
2015-07-28 17:26 ` Tejun Heo
2015-07-28 17:26 ` Tejun Heo
[not found] ` <20150728172657.GC5322-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-07-29 10:07 ` Petr Mladek
2015-07-29 10:07 ` Petr Mladek
2015-07-29 10:07 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 07/14] mm/huge_page: Convert khugepaged() into kthread worker API Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 17:36 ` Tejun Heo
2015-07-28 17:36 ` Tejun Heo
[not found] ` <20150728173635.GD5322-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-07-29 11:32 ` Petr Mladek
2015-07-29 11:32 ` Petr Mladek
2015-07-29 11:32 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 08/14] rcu: Convert RCU gp kthreads " Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 17:37 ` Tejun Heo
2015-07-28 17:37 ` Tejun Heo
2015-07-28 14:39 ` [RFC PATCH 09/14] ring_buffer: Initialize completions statically in the benchmark Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-08-03 18:31 ` Steven Rostedt
2015-08-03 18:31 ` Steven Rostedt
[not found] ` <20150803143109.0b13925b-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2015-09-04 9:31 ` Petr Mladek
2015-09-04 9:31 ` Petr Mladek
2015-09-04 9:31 ` Petr Mladek
2015-09-04 13:15 ` Steven Rostedt
2015-09-04 13:15 ` Steven Rostedt
2015-07-28 14:39 ` [RFC PATCH 10/14] ring_buffer: Fix more races when terminating the producer " Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-08-03 18:33 ` Steven Rostedt
2015-08-03 18:33 ` Steven Rostedt
2015-09-04 9:38 ` Petr Mladek
2015-09-04 9:38 ` Petr Mladek
2015-09-04 9:38 ` Petr Mladek
[not found] ` <20150904093856.GI22739-KsEp0d+Q8qECVLCxKZUutA@public.gmane.org>
2015-09-07 17:49 ` Oleg Nesterov [this message]
2015-09-07 17:49 ` Oleg Nesterov
2015-09-07 17:49 ` Oleg Nesterov
2015-07-28 14:39 ` [RFC PATCH 11/14] ring_buffer: Use kthread worker API for the producer kthread " Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 12/14] kthread_worker: Better support freezable kthread workers Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` [RFC PATCH 13/14] kthread_worker: Add set_kthread_worker_user_nice() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
[not found] ` <1438094371-8326-14-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org>
2015-07-28 17:40 ` Tejun Heo
2015-07-28 17:40 ` Tejun Heo
2015-07-28 17:40 ` Tejun Heo
[not found] ` <20150728174058.GF5322-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-07-29 11:23 ` Petr Mladek
2015-07-29 11:23 ` Petr Mladek
2015-07-29 11:23 ` Petr Mladek
[not found] ` <20150729112354.GK2673-KsEp0d+Q8qECVLCxKZUutA@public.gmane.org>
2015-07-29 15:12 ` Tejun Heo
2015-07-29 15:12 ` Tejun Heo
2015-07-29 15:12 ` Tejun Heo
[not found] ` <1438094371-8326-1-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org>
2015-07-28 14:39 ` [RFC PATCH 14/14] kthread_worker: Add set_kthread_worker_scheduler*() Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 14:39 ` Petr Mladek
2015-07-28 17:41 ` Tejun Heo
2015-07-28 17:41 ` Tejun Heo
[not found] ` <20150728174154.GG5322-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-07-28 19:48 ` Peter Zijlstra
2015-07-28 19:48 ` Peter Zijlstra
2015-07-28 19:48 ` Peter Zijlstra
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=20150907174914.GA2148@redhat.com \
--to=oleg-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=bp-l3A5Bk7waGM@public.gmane.org \
--cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
--cc=josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=live-patching-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=pmladek-IBi9RG/b67k@public.gmane.org \
--cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=vbabka-AlSwsSmVLrQ@public.gmane.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.