Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp597291pxu; Sun, 22 Nov 2020 21:27:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpIz74n2TvuNVcaKUjJgnpcwyU1CcmbrcW+d5t7JK3yBPMlSaWGxtKPQmCHo7ljCo4q5SI X-Received: by 2002:a17:907:4335:: with SMTP id ni5mr38641728ejb.459.1606109243310; Sun, 22 Nov 2020 21:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606109243; cv=none; d=google.com; s=arc-20160816; b=FnC1EyOAHAm8vheu21h+GJU2uyKndFAponpSVg1BSG4RmEUS3+Ie1qMHudowdKb/Wy 3iKbu5lyWkjsJYa97LfvYGnDK3nHk8R9gluKUET7olAML1AjjMfTlw255ZktgBDHvJ3u eNxodbZCeSUF7iGwSvTr90Px5XgWq/A9XYO8JNlMQ2d7clPRAk3Z39MFNyL6beq3Jfn/ UkNIA2ffWmQWnf9NtOeArMZCiw8nnOfjtjfX0Bs1V2OzEsSO1GJp+9BV0BAHpaang6XY pMPNwC9mKFhL5mKC2kJIAOzRbQT1TOApmzUwXyB+QW76qG6k5v/A5YIhcefgFTq0nBJ3 nRWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0omrRunD79MfxCMlZ16iJ8rtR9dpyKqeXUEcRuftrTc=; b=zpyCVXbeU+HkY+mlsv/VAtPSmHeVigbdO8Ibf2QkTtFgCdu3jqxDyugj0zY5J+g8a9 IRNHj7w8MATIezu88ZgRtx2fDo/HhA7SkzTg4RoTmcZfL7SoJe5Uzj4Gx4ENFvw/+qFA CGQ+BPUMS88KZtim2v2/hcEeRlspqi6QBuvRjb+0JzSNc3LlDDPWcuNO4PHzoKPPnltc UShk0gUhsvotSRjz2nnXNkypSaLn6j3yYZtdPRCmIbgNXFoEpNRPnNZBS9prdIGObnCH yC+We12i6KD3zwhu5xL05g8vQzXPUj6mY9dd7cSbL+UcGImkKRvAppa2Yrantrd3gmOd OMMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jJu+0yFq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a27si5764618ejd.485.2020.11.22.21.27.00; Sun, 22 Nov 2020 21:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jJu+0yFq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727086AbgKWEim (ORCPT + 99 others); Sun, 22 Nov 2020 23:38:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725831AbgKWEil (ORCPT ); Sun, 22 Nov 2020 23:38:41 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8106C0613CF for ; Sun, 22 Nov 2020 20:38:41 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id w4so13057897pgg.13 for ; Sun, 22 Nov 2020 20:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0omrRunD79MfxCMlZ16iJ8rtR9dpyKqeXUEcRuftrTc=; b=jJu+0yFqHJXPMXjBacDY71FLIRdFTbyxy6FE2uR29P6Okoihzob1N77enLnlw1kHgt iGfpgsYZSEoTWcoBO/Zn1HEN4lEjHu1/EV2C+Irwty3c4WtAzCbAO66sMNH6FEZa0APH 8g/G1LR1fNRIs8pvgH5T7PfcA053MU/QLPLE99PKG2QlmwzjzKOQ9rw+d39MgTTETZTv cqZ5YxfyprgH3oYnbZzESPd6jDwCVImaSy976pZoiRaGeZHr70T/AKDC4WDMiTq9snN/ aCl95LiE1XG0K2bl1ipnu5UORUgoQ1NpD7gz08/CJOATFHvkHweevD5Jmr5Rq2IiYXvw l+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0omrRunD79MfxCMlZ16iJ8rtR9dpyKqeXUEcRuftrTc=; b=MM8APjytWuuazRliSUNQPkZJhgrDHFYToivuNp5XzvbCNtFt7C63aJTR1+C5hH/g/0 Z0HeFnMg4O93N9yNHI9ElcpIrR1DYtdFOIpon6SZQHjY5WE9IM1+fhpZEQMVPDg7eda3 uv/vWUF6VmKht3exV5/Wq/x6Ccw6FG/xkQo96HYzWCq4F2XvS2F8Ddu5bFDGzUat971o dQ6ExH/nfSYbFG8nAAMlee5cOsHnMGG8LKUtPHmNv3fa+yHL4pTpaUcKmZicXmLCfb83 yuY4Yh9Sa8J7lgGHzvM+vfXU+MvudxLJimmHcTkZkp6HM9EwWkYEoQsenZfLnpHTxMNS yZ+Q== X-Gm-Message-State: AOAM531v6ZuJABCtxcjF9uDx/fiUN9jwyAvaj95ZUMu2idtfFFDVOQa0 e3AYDVzxAiDcvBdnJiHtRlk= X-Received: by 2002:a17:90a:ae04:: with SMTP id t4mr18883851pjq.137.1606106321062; Sun, 22 Nov 2020 20:38:41 -0800 (PST) Received: from localhost (61-68-227-232.tpgi.com.au. [61.68.227.232]) by smtp.gmail.com with ESMTPSA id q21sm605747pgk.3.2020.11.22.20.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2020 20:38:40 -0800 (PST) Date: Mon, 23 Nov 2020 15:38:36 +1100 From: Balbir Singh To: "Joel Fernandes (Google)" Cc: Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, pjt@google.com, rostedt@goodmis.org, derkling@google.com, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , jsbarnes@google.com, chris.hyser@oracle.com, Ben Segall , Josh Don , Hao Luo , Tom Lendacky , "Paul E . McKenney" , Aubrey Li , Tim Chen Subject: Re: [PATCH -tip 13/32] sched: Trivial forced-newidle balancer Message-ID: <20201123043836.GG110669@balbir-desktop> References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-14-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117232003.3580179-14-joel@joelfernandes.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 06:19:43PM -0500, Joel Fernandes (Google) wrote: > From: Peter Zijlstra > > When a sibling is forced-idle to match the core-cookie; search for > matching tasks to fill the core. > > rcu_read_unlock() can incur an infrequent deadlock in > sched_core_balance(). Fix this by using the RCU-sched flavor instead. > ... > + > + if (p->core_occupation > dst->idle->core_occupation) > + goto next; > + I am unable to understand this check, a comment or clarification in the changelog will help. I presume we are looking at either one or two cpus to define the core_occupation and we expect to match it against the destination CPU. Balbir Singh.