From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [RFC PATCH 15/18] ring_buffer: Allow to exit the ring buffer benchmark immediately Date: Mon, 8 Jun 2015 13:44:17 -0400 Message-ID: <20150608134417.3fb7a811@gandalf.local.home> References: <1433516477-5153-1-git-send-email-pmladek@suse.cz> <1433516477-5153-16-git-send-email-pmladek@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433516477-5153-16-git-send-email-pmladek-AlSwsSmVLrQ@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Tejun Heo , Ingo Molnar , Peter Zijlstra , Richard Weinberger , David Woodhouse , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Trond Myklebust , Anna Schumaker , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chris Mason , "Paul E. McKenney" , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , live-patching-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On Fri, 5 Jun 2015 17:01:14 +0200 Petr Mladek wrote: > It takes a while until the ring_buffer_benchmark module is removed > when the ring buffer hammer is running. It is because it takes > few seconds and kthread_should_terminate() is not being checked. > > This patch adds the check for kthread termination into the producer. > It uses the existing kill_test flag to finish the kthreads as > cleanly as possible. > > It disables printing the "ERROR" message when the kthread is going. > > Also it makes sure that producer does not go into the 10sec sleep > when it is being killed. This patch looks like something I may take regardless of the other patches (if it applies cleanly). As for the other patches, the ring buffer benchmark is just that, a benchmark that I use when making changes to the ring buffer. It's not something for production systems. What about just adding a depend on !LIVE_PATCHING to RING_BUFFER_BENCHMARK, or force it to shut down during patching. There's no reason to make it safe to be running when you patch the kernel. Just adds complexity to some simple code. -- Steve