From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbbKPTKP (ORCPT ); Mon, 16 Nov 2015 14:10:15 -0500 Received: from mail-yk0-f176.google.com ([209.85.160.176]:35460 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbbKPTKL (ORCPT ); Mon, 16 Nov 2015 14:10:11 -0500 Date: Mon, 16 Nov 2015 14:10:07 -0500 From: Tejun Heo To: Oleg Nesterov Cc: Ingo Molnar , Peter Zijlstra , Milos Vyletel , Prarit Bhargava , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] stop_machine: cleanup the usage of preemption counter in cpu_stopper_thread() Message-ID: <20151116191007.GL18894@mtj.duckdns.org> References: <20151115193254.GA8225@redhat.com> <20151115193332.GA8281@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151115193332.GA8281@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 15, 2015 at 08:33:32PM +0100, Oleg Nesterov wrote: > 1. Change this code to use preempt_count_inc/preempt_count_dec; this way > it works even if CONFIG_PREEMPT_COUNT=n, and we avoid the unnecessary > __preempt_schedule() check (stop_sched_class is not preemptible). > > And this makes clear that we only want to make preempt_count() != 0 > for __might_sleep() / schedule_debug(). > > 2. Change WARN_ONCE() to use %pf to print the function name and remove > kallsyms_lookup/ksym_buf. > > 3. Move "int ret" into the "if (work)" block, this looks more consistent. > > Signed-off-by: Oleg Nesterov The entire series looks good to me. Please feel free to add Acked-by: Tejun Heo Thanks. -- tejun