From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbdLFXud (ORCPT ); Wed, 6 Dec 2017 18:50:33 -0500 Received: from mail-qt0-f173.google.com ([209.85.216.173]:36840 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbdLFXuc (ORCPT ); Wed, 6 Dec 2017 18:50:32 -0500 X-Google-Smtp-Source: AGs4zMai1hxTic2DWH+ckBFAYi1Xi1EadPsxHgHHUVBlavLJqHJPB0gXFH7wvfRlmNUk3wFnW9qnvA== Date: Wed, 6 Dec 2017 21:50:19 -0200 From: Rodrigo Siqueira To: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Scheduler: Removed first parameter from prepare_lock_switch Message-ID: <20171206235019.vvpx467magnuk25d@smtp.gmail.com> References: <20171205140200.4guikhmagltvoehm@smtp.gmail.com> <20171206121437.g7wsnqhx6oyycyqf@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171206121437.g7wsnqhx6oyycyqf@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20171013 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Yes, this is correct. However it had me looking at that code and pretty > much everything else is completely wrong :-) > > That is, its functionally correct (probably), but the function name is > not descriptive of what the function does and the comment is just plain > wrong. > > Also, since both functions are only used in core.c we should probably > move them there. I'm not sure I understood it completely. What do you mean for wrong? Will CONFIG_SMP a meaningless check here? How about moving 'prepare_lock_switch' code from sched.h to prepare_task_switch in core.c? And about the comment in 'prepare_lock_switch', I can replace it to "Set on_cpu to 1 during the context switch will lock the processes on the cpu" > Do you think you can fix all that as well? Yeah absolutely, I just might need a few more comprehension on it.