Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5507731rwi; Mon, 17 Oct 2022 23:21:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fJ1azjKHrPcIqxVOu0/Yr/a/7ihSLx1HOAMROSSEr8oj0HIt8CnynnRSrlsz1I91PV95q X-Received: by 2002:a17:907:6ea1:b0:78d:4c16:a68b with SMTP id sh33-20020a1709076ea100b0078d4c16a68bmr1110795ejc.447.1666074068464; Mon, 17 Oct 2022 23:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666074068; cv=none; d=google.com; s=arc-20160816; b=WmHG7H8ofpuCbZQH/qqsg/LternGeqJffxIvOdF9cVs6fMxeUxyd9luTHUhgonaKST gO2xsAWP9hLDO628Y9ASp1eUQl5v/Vx4VntQ8nQO0Avq6zQNBZzOEz/x6Hb0oVubSic9 f1MoSVxxX6ewmmJ7SbH7Avvmd2/AI2D202GBe1RSGsXaMiyGNM1nAs4svPZkTx5xBPWL 9Inf+KW6yRBycDvNXERsoTukRqckEJzm/RbWS32ceH2a+YC9wkQUYPOPhDeyVi52ti+U mqEbBOzF1MJh/CrD9cAOs2fr7tUuNoqSUqggSbCCrroh6sV8S1/3mat7hYxTZ4GtbSIg D4NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rrSLeS7stRE/t8A98eeGX6eTQM51safURvSVGcjgGo4=; b=Kmx2GZ9OS1T7YtwFdy7tZo/DmmFaVSv1JHw6kCdIapWEQAGUiDVtd44cdcm6ciPCjb 0WVqccVEvoAAEWKHXmQtrI2HbGDjoy6I9+lVOJwO2ujV4f/tvr5WYeUaxcbl3rMNXz3i o6I/zp0NmpBjRXYZeiCZnvA+Ln2FA6U+f1sT7HjzY1RHt/drM9Kl8V0M/uv0W+o/KxaI dvlh2Z1wpEpu34VDHydDi0pPkW4yLB2aR7wfvg2NNpzeqWzxF98FBS+ow2Suo90Td5St LReG9aIGD7+TGNPLwD6xu8NaUFDDaMhiwWoqusKXn6kGSuDS/KtMRqReUoDNM1vr8Zyw juFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="VfDIGn7/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a170906680f00b0078db717cf44si8831722ejr.303.2022.10.17.23.20.42; Mon, 17 Oct 2022 23:21:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="VfDIGn7/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbiJRFcc (ORCPT + 99 others); Tue, 18 Oct 2022 01:32:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiJRFca (ORCPT ); Tue, 18 Oct 2022 01:32:30 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07AD097EE3 for ; Mon, 17 Oct 2022 22:32:30 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id a6so16550176ljq.5 for ; Mon, 17 Oct 2022 22:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rrSLeS7stRE/t8A98eeGX6eTQM51safURvSVGcjgGo4=; b=VfDIGn7/yVo/AsdPcRD1CGtURB4HYnno7Ri5dVUP9JQUMvO94y6lHIecfRH5ht/iSr 0g7Kuiwru88sFLXcCsY62qnrOjfHsrA9L3MUuiyYHGZQygyEEw62KAEkMKpx0cPiDlZS xKyA1qpDZz2kypi2rpzypgXghVUu0YXK1JSSZ08YNSwAzFG16UTywpyKdJRu6vztfSDa WZR+P73iXbrIVZwe7ipqUD1ygoYWLZsP+lqhchy7k0Yvfo59omS1ozly0pZ6juVaqmmb fUhNH2nVqA73fkzRAPPz04Yi+MniP+JH7EgM5f8laT40+nARbUUgmxS3LinoqZvHKgsp WCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rrSLeS7stRE/t8A98eeGX6eTQM51safURvSVGcjgGo4=; b=Ee/mQyy851VyBCbfjjvnBvV7sAesdYGCBw1CjJSy+CgrH+MafUUB+obe/6Bk2UYz1C 40uyE/6s9VfwgYijD7Hai/vvNaKAhepN9d0vMcvlXc3IN/9uyoijaA9xHedqEQDqJoAp grBxIClBduOEXlD/OuYu+SOXBhXevLPTOmY6UkwIdH6CXDo1kb51UGQdiufBdQJnAX0e Mtdb7qoQQFNV+TRz6sgXvd74t7AwIjzORDqAdFD0+WiAOpsWW6rJe20hcSotWwwWW2GM lqtcoAiSloE8rSQfRa98dLTKilTolNgZViFt9fQkO0twUgeEc7QzHpN+/CkZ81GTyLrR Y2Dg== X-Gm-Message-State: ACrzQf0im+bInGgxUat7Vq/DKaJhNLt9rf4/Jqz1XtKPasQiBod3usOc OLXuS3R+ZJAkGLB3pQUC486aSWyvDrJk7x/WcL7v X-Received: by 2002:a2e:9e50:0:b0:261:e3fd:cdc5 with SMTP id g16-20020a2e9e50000000b00261e3fdcdc5mr457585ljk.56.1666071148259; Mon, 17 Oct 2022 22:32:28 -0700 (PDT) MIME-Version: 1.0 References: <20221003232033.3404802-1-jstultz@google.com> <20221003232033.3404802-3-jstultz@google.com> In-Reply-To: From: John Stultz Date: Mon, 17 Oct 2022 22:32:16 -0700 Message-ID: Subject: Re: [PATCH RFC v4 2/3] sched: Avoid placing RT threads on cores handling long softirqs To: Alexander Gordeev Cc: LKML , "Connor O'Brien" , John Dias , Rick Yiu , John Kacur , Qais Yousef , Chris Redpath , Abhijeet Dharmapurikar , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Thomas Gleixner , kernel-team@android.com, "J . Avila" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2022 at 8:42 PM John Stultz wrote: > On Mon, Oct 17, 2022 at 5:40 AM Alexander Gordeev > wrote: > > On Mon, Oct 03, 2022 at 11:20:32PM +0000, John Stultz wrote: > > > + preempt_count() & SOFTIRQ_MASK); > > > > Could you please clarify this whole check in more detail? > > > > What is the point in checking if a remote CPU is handling > > a "long" softirq while the local one is handling any softirq? > > Good question! This looks like an error from my rework of the earlier > version of the patch. > In v1 it was: > task_thread_info(curr)->preempt_count & SOFTIRQ_MASK)); > And it looks like I erroneously condensed that to preempt_count() & > SOFTIRQ_MASK treating curr (from the target cpu rq) as if it were > current. :P > > I'll fix this. Thank you for catching it! Ah, it's not so trivial to fix as I see part of my motivation for condensing it was task_thread_info(curr)->preempt_count doesn't build on x86 (which uses percpu values instead of threadinfo). So I'll have to think a bit more about how to do this generically, and if the conditionalization can be otherwise simplified. Thanks again for pointing the issue out! -john