From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8D01C4338F for ; Sun, 22 Aug 2021 17:33:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A285E61214 for ; Sun, 22 Aug 2021 17:33:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A285E61214 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eIGHed9pdxK7TQH4vjPC2otx0YEsGbw5cvT+4ERIZ+g=; b=o+VIJIJjZx6bCZ PEbgJD4wlWi8rHit8NECZuOdn3FgRYMKwJroPykWg7oyEzUnRxCC6NXAC1OcDsm/adwY34n2l51IE 0iRkXocwvyehA0UchWdo+sdmlUUfTK5tJQW0C4FHSEEsNvEbZE/hEQYyrS4junfy9F6/sR8Vd63Dc AKyl+c2WAWWm6qssEOVH64NkBucDbBJdxePAdf86CGohUUVXwEn5BAiuLIeVOhfL3+yds7w6jAhcz q5sxidvMIblIjV0HaYURgrEt0I9vxk6WyiIZrOy6PYXmu3v6nPQFWxp2+NWt9jKEMgOcOJaNci5G0 tBhXAb9qmVrds1yXQTDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mHrJj-00EPep-0g; Sun, 22 Aug 2021 17:31:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mHrJe-00EPdq-CD for linux-arm-kernel@lists.infradead.org; Sun, 22 Aug 2021 17:31:27 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 32E411042; Sun, 22 Aug 2021 10:31:20 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 335B33F5A1; Sun, 22 Aug 2021 10:31:17 -0700 (PDT) From: Valentin Schneider To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Paul E. McKenney" , Frederic Weisbecker , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: [PATCH v3 2/4] sched: Introduce migratable() In-Reply-To: <20210817144348.kkgoytuz3766jeoz@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-3-valentin.schneider@arm.com> <20210817144348.kkgoytuz3766jeoz@linutronix.de> Date: Sun, 22 Aug 2021 18:31:11 +0100 Message-ID: <87h7fh75eo.mognet@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210822_103126_506343_FFEF7E69 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 17/08/21 16:43, Sebastian Andrzej Siewior wrote: > On 2021-08-11 21:13:52 [+0100], Valentin Schneider wrote: >> diff --git a/include/linux/sched.h b/include/linux/sched.h >> index debc960f41e3..8ba7b4a7ee69 100644 >> --- a/include/linux/sched.h >> +++ b/include/linux/sched.h >> @@ -1715,6 +1715,16 @@ static inline bool is_percpu_thread(void) >> #endif >> } >> >> +/* Is the current task guaranteed to stay on its current CPU? */ >> +static inline bool migratable(void) >> +{ >> +#ifdef CONFIG_SMP >> + return preemptible() && !current->migration_disabled; >> +#else >> + return true; > > shouldn't this be false in the UP case? > Yes indeed, forgot to flip that one when inverting the logic. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel