Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp4216504ybh; Tue, 17 Mar 2020 14:37:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsLCqumPqtD1hydpWGjh9eVs5KGrH/Ifba3vFJDBt8p4731V4K9fwQq3Vu5Y9XdCnNn597E X-Received: by 2002:a05:6830:1ac1:: with SMTP id r1mr1204525otc.264.1584481034840; Tue, 17 Mar 2020 14:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584481034; cv=none; d=google.com; s=arc-20160816; b=mznMMGUhg+GHH7ko08uwAAP1f0SeBxJ1cEmHVf8/DpOxUVrjhB7EuBW5tvqOwqGJlO LIVOCdm5Ld73Ds8lza9sbq0Ejoiz/cAIsA9hpG6PXz7tJ4aTK4Ry0lwl2GPSFD+kgTjC 3WigulwJ98pYl++8jit6Lhxve1tPaDW/Q2hQmDf/GxJ+7nez/J5sjgUY898nWrQ6COoH vSKaGP9Q6L4Y94WiL4CTI4H0yZiqfARp/lRQCUikSiXI0/uiw0Y5FhiuPiza7apJmjou IzIY4hmQUOrn0ovfZAlNAgJXV/uFCdSKcCo5Oa/Fd/Qzc4ADbMmpo7Lm7Y8XaLzRxQhL 6Z/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ftj10VLsYaiA6T3F2kq6t1b/UKFGKg8xJC5CD9CHAZg=; b=XRhLaqfjZS1Y3/NN2BjChLXaSrkNtipqtcdFm8lrLTDZYXCxVvrjVOLLu1nA9+3FCu z7RyTZpjH7wnEmWbW96PZi/EyAr0EhFHm7zCFSkRe8uRxcP/cba5jRrMnpGVm3zU8KqA 3mRgPf1TAQeZ54sP6OpuvzWmudD06kChqLNlPj4iYnSX6g4uj3cEayOb7iufFeqVc3xU Bdz+B1RwgWAbghqnKK7HxxjNpAjWX2yFZ5YF95Z2LsP5MqcHrGWwVa0iXF6XXa8QyLOA sy0/1RYsHZCGA4WDaL1Fi/ts2SSnWlCZx6FdTEibjqMxY0Us4PbaT5HUZLB7abY3tDhh BEKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S2s7zvMj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c201si2192142oib.57.2020.03.17.14.36.59; Tue, 17 Mar 2020 14:37:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S2s7zvMj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727027AbgCQVfq (ORCPT + 99 others); Tue, 17 Mar 2020 17:35:46 -0400 Received: from mail-qv1-f65.google.com ([209.85.219.65]:40062 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbgCQVfp (ORCPT ); Tue, 17 Mar 2020 17:35:45 -0400 Received: by mail-qv1-f65.google.com with SMTP id cy12so5880492qvb.7 for ; Tue, 17 Mar 2020 14:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ftj10VLsYaiA6T3F2kq6t1b/UKFGKg8xJC5CD9CHAZg=; b=S2s7zvMjdQS2YL59qrGpnLepk5Dx85cXsRT8C8oanXXydslCXFue7WW16zAr2sbNWt GS0Ow5CjYtZ0ItjiAm9xGPsgxXdFUCAJLI4+BU6pp066EycbGudGs8YJ9oGWz77drJfs L5qDqxz/TFwYKR1g0hglZEOej9vrYI3LtRPk6gSO+og/Du5tsULTG1eEzxNiuI57m0te B6Q4cTJ+swdm/VASYkZ9awnNV54Y/orFynKe+GXK/Gu5WMJElMCmGcSjBW0kxQ5hEHHh 7lFSnHZBE7WwssCb/3Qtg++PwYrQe9HkJrDA9mL3+MwrF02zhjMZn8VqA97fPiEtH+IZ Gagg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ftj10VLsYaiA6T3F2kq6t1b/UKFGKg8xJC5CD9CHAZg=; b=XI55/YeXd8MtzBD9o+oMEDN53G2RjV71eS+IR1zqqqjalP1UDzTwqe4s8imzoSrrcV TFfkyJ+VhiCUIvAcHfLmosXEmH4ONIeFDhVTEGWqAH4N35goCvlo6zTqEXcbFY3ozKR+ gYnUGIgkyPlnoSOs+i6/uoEvuhRauMjaWWkQSE6lBoCmHZXqJ7BtruKeI126o54dOXPV tbCNsNiCgyuiBkx+JWYW9cMSaAK5JOrLFDVrMqQYgI+FgDWn1Hgo4B8ERGWplAgRKUQQ 2a+WTKF5g8YbWQl4eLGGDF6e4oHMqHYRYvw5bNFuBCuGKpqcu7FtKpsuByGfWgtB4z2F AyAA== X-Gm-Message-State: ANhLgQ37EYc7Wq0yRlYH64RfiFEjvU2R4wzDzQwoIa2saGAeUUS1hj+q DrZVmNjO+Envk/9ugffCmzsXBMMP7+RmWdxgp7kvlg== X-Received: by 2002:ad4:54d4:: with SMTP id j20mr1205826qvx.75.1584480943367; Tue, 17 Mar 2020 14:35:43 -0700 (PDT) MIME-Version: 1.0 References: <20200311010113.136465-1-joshdon@google.com> <20200311140533.pclgecwhbpqzyrks@e107158-lin.cambridge.arm.com> <20200317192401.GE20713@hirez.programming.kicks-ass.net> In-Reply-To: <20200317192401.GE20713@hirez.programming.kicks-ass.net> From: Josh Don Date: Tue, 17 Mar 2020 14:35:32 -0700 Message-ID: Subject: Re: [PATCH v2] sched/cpuset: distribute tasks within affinity masks To: Peter Zijlstra Cc: Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Li Zefan , Tejun Heo , Johannes Weiner , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel , cgroups@vger.kernel.org, Paul Turner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 7:05 AM Qais Yousef wrote: > > This actually helps me fix a similar problem I faced in RT [1]. If multiple RT > tasks wakeup at the same time we get a 'thundering herd' issue where they all > end up going to the same CPU, just to be pushed out again. > > Beside this will help fix another problem for RT tasks fitness, which is > a manifestation of the problem above. If two tasks wake up at the same time and > they happen to run on a little cpu (but request to run on a big one), one of > them will end up being migrated because find_lowest_rq() will return the first > cpu in the mask for both tasks. > > I tested the API (not the change in sched/core.c) and it looks good to me. Nice, glad that the API already has another use case. Thanks for taking a look. > nit: cpumask_first_and() is better here? Yea, I would also prefer to use it, but the definition of cpumask_first_and() follows this section, as it itself uses cpumask_next_and(). > It might be a good idea to split the API from the user too. Not sure what you mean by this, could you clarify? On Tue, Mar 17, 2020 at 12:24 PM Peter Zijlstra wrote: > > > Anyway, for the API. > > > > Reviewed-by: Qais Yousef > > Tested-by: Qais Yousef > > Thanks guys! Thanks Peter, any other comments or are you happy with merging this patch as-is?