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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 EA460C433DB for ; Tue, 26 Jan 2021 11:04:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9C023206F6 for ; Tue, 26 Jan 2021 11:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C023206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0Wma8x61GIYl7T8gSf6sGZVHfgEdH7YRsebTHdVJx0k=; b=d6e9xpK1IJ4Y9j9X6sffDNftC kog8H2x5qwK53nZ2niLeVxWQSSsfkVYGP3VkFd2qJ46AclBspa5L3LO6yUC5f8+eJtQKUh6oZWdUn jSgf7DXRdmIARw3wWURviWKNX9LQ5yeVzu/Pmqh/txOfAQn1YzW7WPGYbKKNNdd7OOONcm4CcKkQ1 maBsYqTUHXFauzfcuKBFD7Xu1YmPL/OwN9nAK5LNsOv3E2x3s9FQF49jkbY4gHy0PkogawOnWG6h1 DmQHhERk+oWm5mR+g6yI7LcxMfsKAo7Ad4TKW42v68MKe3nOVhkcl7N4swEHzWfeSQ19i3e+Fp/hQ YTcfsLcqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4M7R-0003J2-TV; Tue, 26 Jan 2021 11:02:46 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4M7P-0003HV-BZ for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 11:02:44 +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 D71C7D6E; Tue, 26 Jan 2021 03:02:38 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0A9E3F66B; Tue, 26 Jan 2021 03:02:33 -0800 (PST) Subject: Re: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and add cluster scheduler To: "Song Bao Hua (Barry Song)" , Morten Rasmussen , Tim Chen References: <20210106083026.40444-1-song.bao.hua@hisilicon.com> <737932c9-846a-0a6b-08b8-e2d2d95b67ce@linux.intel.com> <20210108151241.GA47324@e123083-lin> <99c07bdf-02d1-153a-bd1e-2f4200cc67c5@linux.intel.com> <20210111092811.GB47324@e123083-lin> <4fdc781e-7385-2ae6-d9c9-3ec165f473c4@arm.com> <076088f4daf64727b1587b162eb08dda@hisilicon.com> From: Dietmar Eggemann Message-ID: Date: Tue, 26 Jan 2021 12:02:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <076088f4daf64727b1587b162eb08dda@hisilicon.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_060243_500227_5D709C58 X-CRM114-Status: GOOD ( 21.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "juri.lelli@redhat.com" , "mark.rutland@arm.com" , "peterz@infradead.org" , "catalin.marinas@arm.com" , "bsegall@google.com" , "xuwei \(O\)" , "will@kernel.org" , "vincent.guittot@linaro.org" , "aubrey.li@linux.intel.com" , "linux-acpi@vger.kernel.org" , "mingo@redhat.com" , "mgorman@suse.de" , "valentin.schneider@arm.com" , "lenb@kernel.org" , "linuxarm@openeuler.org" , "rostedt@goodmis.org" , "Zengtao \(B\)" , Jonathan Cameron , "linux-arm-kernel@lists.infradead.org" , "gregkh@linuxfoundation.org" , "rjw@rjwysocki.net" , "linux-kernel@vger.kernel.org" , "sudeep.holla@arm.com" , "tiantao \(H\)" 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 25/01/2021 11:50, Song Bao Hua (Barry Song) wrote: > >> -----Original Message----- >> From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com] >> Sent: Wednesday, January 13, 2021 12:00 AM >> To: Morten Rasmussen ; Tim Chen >> >> Cc: Song Bao Hua (Barry Song) ; >> valentin.schneider@arm.com; catalin.marinas@arm.com; will@kernel.org; >> rjw@rjwysocki.net; vincent.guittot@linaro.org; lenb@kernel.org; >> gregkh@linuxfoundation.org; Jonathan Cameron ; >> mingo@redhat.com; peterz@infradead.org; juri.lelli@redhat.com; >> rostedt@goodmis.org; bsegall@google.com; mgorman@suse.de; >> mark.rutland@arm.com; sudeep.holla@arm.com; aubrey.li@linux.intel.com; >> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; >> linux-acpi@vger.kernel.org; linuxarm@openeuler.org; xuwei (O) >> ; Zengtao (B) ; tiantao (H) >> >> Subject: Re: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and >> add cluster scheduler >> >> On 11/01/2021 10:28, Morten Rasmussen wrote: >>> On Fri, Jan 08, 2021 at 12:22:41PM -0800, Tim Chen wrote: >>>> >>>> >>>> On 1/8/21 7:12 AM, Morten Rasmussen wrote: >>>>> On Thu, Jan 07, 2021 at 03:16:47PM -0800, Tim Chen wrote: >>>>>> On 1/6/21 12:30 AM, Barry Song wrote: [...] >> wake_wide() switches between packing (select_idle_sibling(), llc_size >> CPUs) and spreading (find_idlest_cpu(), all CPUs). >> >> AFAICS, since none of the sched domains set SD_BALANCE_WAKE, currently >> all wakeups are (llc-)packed. > > Sorry for late response. I was struggling with some other topology > issues recently. > > For "all wakeups are (llc-)packed", > it seems you mean current want_affine is only affecting the new_cpu, > and for wake-up path, we will always go to select_idle_sibling() rather > than find_idlest_cpu() since nobody sets SD_WAKE_BALANCE in any > sched_domain ? > >> >> select_task_rq_fair() >> >> for_each_domain(cpu, tmp) >> >> if (tmp->flags & sd_flag) >> sd = tmp; >> >> >> In case we would like to further distinguish between llc-packing and >> even narrower (cluster or MC-L2)-packing, we would introduce a 2. level >> packing vs. spreading heuristic further down in sis(). > > I didn't get your point on "2 level packing". Would you like > to describe more? It seems you mean we need to have separate > calculation for avg_scan_cost and sched_feat(SIS_) for cluster > (or MC-L2) since cluster and llc are not in the same level > physically? By '1. level packing' I meant going sis() (i.e. sd=per_cpu(sd_llc, target)) instead of routing WF_TTWU through find_idlest_cpu() which uses a broader sd span (in case all sd's (or at least up to an sd > llc) would have SD_BALANCE_WAKE set). wake_wide() (wakee/waker flip heuristic) is currently used to make this decision. But since no sd sets SD_BALANCE_WAKE we always go sis() for WF_TTWU. '2. level packing' would be the decision between cluster- and llc-packing. The question was which heuristic could be used here. >> IMHO, Barry's current implementation doesn't do this right now. Instead >> he's trying to pack on cluster first and if not successful look further >> among the remaining llc CPUs for an idle CPU. > > Yes. That is exactly what the current patch is doing. And this will be favoring cluster- over llc-packing for each task instead. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel