Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5415979rwi; Mon, 17 Oct 2022 21:30:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yhOCBbCalLsYl0E3u4qWAXHaNF5aY/YZknTVDLYja+8uchKC9LgwcXBZC8ICkocJmZZvC X-Received: by 2002:a05:6402:27c9:b0:45d:4539:b462 with SMTP id c9-20020a05640227c900b0045d4539b462mr877746ede.226.1666067428762; Mon, 17 Oct 2022 21:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666067428; cv=none; d=google.com; s=arc-20160816; b=qOoD3AqUGx6z+cDb9FVwx6z3l8zHV+fu9bdxXMsxIBME3Bl1qcvqjCxMaD4d0QkCMT R5+2wJhrYDvqQDKZ+VUUMTych3SBsGK+ertptJew1xJlUqjMFeXLKREp+tgMk7voRAj0 eKZXKe+mwEYUWVHCzmz3SQ+tZVVqB2STy3x6gmLg+DmKRgxhlJOA3CkT0wfLu1n/uLR5 7OjWLedyaL0zWQiecpBxKfEsAoWcvxM7d6TYNdh6bAdw9UgN1Pm/CzZBiCz203Q8hACp b5lEeS/GSMbN/sRWb3Bu0OZMmMMUp1YGI/I1hE52NINl90ZgXGr0ehy3enlu2KiRlAjR RQ6A== 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=b1IbzdSiR6tLjp8VojCh4WDcI7764XTDkXzy+V8xmVY=; b=ATeiMW5xDuXQ8rcz+g/3b3nBcKZwVdMPWrudXCCOnw7s9YSDBNMCz52el//HkUvBOQ A+BwjfCEYvQ3s3Zqaq1UWR+JJOZ3j6yO6DINc0mGb4iEDx4ssO1scGstku49vU8n6jbk 2MNXKXQie38+3k2F6OBCw9afNAegOPV/15hktw6VL3q7p3LBJ1UBmLOxwBl8ocMsfhGD bzXDdpjTxlhAY1uGRj+r9Z05U326W6lLSNOtfdBhuTdfcSaLTzrMAlDWCJKSAXI+3fjy F7sp1q0N4iI73v6/Te9RtuC+1WIWpVzESV6HjKLPNzJBMknSen3tq6zedXMrOS5PZRJR tUAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B5PkU4My; 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 m17-20020a056402511100b0045938ab7129si11978519edd.330.2022.10.17.21.30.03; Mon, 17 Oct 2022 21:30:28 -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=B5PkU4My; 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 S229833AbiJRD7j (ORCPT + 99 others); Mon, 17 Oct 2022 23:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbiJRD7S (ORCPT ); Mon, 17 Oct 2022 23:59:18 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC5F88A20 for ; Mon, 17 Oct 2022 20:59:15 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id be13so4979528lfb.4 for ; Mon, 17 Oct 2022 20:59:15 -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=b1IbzdSiR6tLjp8VojCh4WDcI7764XTDkXzy+V8xmVY=; b=B5PkU4My2AxIlUJjYKnjO09o2ko/+ftSVSLvqM1r1SXOLwoUNKrCz+O1IeLkFmJT1X 4QLi2puqIkCWUzWNDoqGtzr+oKk9s+FLTuQGWJamRpggVMHG2qrwyHSCA/Qi3smcubFX hrSAJvlcdaas8RAAFunnT3XUGWqs4yz9Kgt/J1RG8MxEAtyrQdMP0i5kU5dkxlEq4X1z ikp5NrdL026ZaBX9lHTk49il5M2R/nK/7FpY2HAhBv7gmRz1hRbT6FCFIl/mftA12HO/ 8AKQefLlzlBUMatpi1S2P42kKxXnbMkoNU3EF7q0RR6qB+3duHe3qrFywwFDWiDQwxeM nFRA== 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=b1IbzdSiR6tLjp8VojCh4WDcI7764XTDkXzy+V8xmVY=; b=lvB48fvcY7S39XRGoJZL3Z+0gJb5eap4c306HDChEyRln/4Q3lOjV5tFu39UdAoF6W fi0Pdd39wU5kg/KlcMJyWh87Lp469o8AJErS33SosqJkmMh6LGKbdfJEBDOgpadE9lwp 8JayfHhF9uYnHXhFA2HntpWgI3RWh6wgBWZCn1RBKVds3n8hd9LHRKn99gMkQj00d1vn DrVVSXomkSWbx3VwohtJYD9bNyhQUgfFOXQyx4isSO3zQAA1BhCEKG8gd+9wSAQBGG0x xZqxuOOg2YV7Oqo+QfvB1BZ1sn5FoSJXtJTyggP7u1BKqKcxpceHHhDtIKZ2D6+2s+CR iZyg== X-Gm-Message-State: ACrzQf0/PIn5yQqWCVyrqfT5H3HsSbHgCKHMRRTiXmW9zE3mtAOhnGaA YjxQiPGV/nhQ7NNcGVIjRhtuJ9sU01aYY268HftW X-Received: by 2002:ac2:4c47:0:b0:4a2:c07b:4b62 with SMTP id o7-20020ac24c47000000b004a2c07b4b62mr275725lfk.426.1666065553267; Mon, 17 Oct 2022 20:59:13 -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 20:59:00 -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: > > select_task_rq_rt() takes the lock and reads curr already, > > before calling this funciton. I think there is a way to > > decompose it in a better way. > > Hrm. Suggestions? As select_task_rq_rt() is only one of the callers. > Trying to pass curr into cpu_busy_with_softirqs() would mean > cpupri_find_fitness() would need to read the cpu_rq(cpu)->curr for the > specified cpu and pass that in. > > The original patch actually was > Whoops I didn't finish my thought there. I was going to say the original patch did similar to your suggestion, passing the target cpu curr task value in from select_task_rq_rt(). However it didn't use the cpupri_find_fitness() and duplicated a lot of similar logic in a way that is not as nice as what the current version uses. But I'm very much open to suggestions for other ways to simplify that as you suggest. thanks -john