Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1725345pxb; Mon, 12 Apr 2021 05:23:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2JWjpEimjJztZ+KHcLzC2QFa58k2NrRyOCZKwJiNsSkur4uIBzwWGDGwZe1hPx8/aZ8Uv X-Received: by 2002:a17:907:3e93:: with SMTP id hs19mr27744525ejc.272.1618230230824; Mon, 12 Apr 2021 05:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618230230; cv=none; d=google.com; s=arc-20160816; b=KTcKJxXV3FoUKZf9HatG0BEjx6X7rvo05BmFymqQ8znLjIKl5fZCW0Eb+XKkuRXu8P Dpwb6HwHvXn/EttgbXDPy+Tb8caRAajFkR9ubY6aowhgB+cq3RnEyStNPHyn1RCdO5gm k8PIb3r++WuJIM3WZWm2JhS6k8SBhW4eoN3gR6yNDgrKoQOmJg5s+0DYspdVXpxMFMSs MSA97PwRYq/r8Wvib2ulimkooI+3gHJgd1ltFrhGFhXohEpqo0rymb/wwlYvrdmOoldG je4ezhVXPlMGnqVFIeFy4zHcB1u0Jjs0uOTdafRp5jIQ9KkBap6bKR6HxZU+O0o1LdK2 3dIA== 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=7jGUYvG/VpC5dfomQS+f5L/i07bp1VPDdzETKNMiL1s=; b=chUflepa8OLIHiNwOGFb1liiV9mcqfmcaWOCXyhXt9eG7DwYAGhLmD8DCvU/EXveJO ujliGsiZ4KfTzahpExeXhvfjLvYSJQJy4rdxhkewsKNVNLR+hFIe20a7/rrH6vOYHJky rbwa9hwxYpQCRkqvv3JFTooLrFrw9W653ljcWyieJiWlpJV9PHvnjd4gn4XXkORF8XKr g6+KiszcTK7rJh+4X+WyItUu+qUvrQLk3KtpCE9ZgAf8qwrswweMMUGZBBv7IlGaypum 06ic4fArc40tUUOmqe9HDyuhUuOr+rI7XP9e80Zyq0UFXp9DFGkyPJf1UxJTIgDEbEuw VcjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uNsHyYk5; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si7448004ejp.610.2021.04.12.05.23.27; Mon, 12 Apr 2021 05:23:50 -0700 (PDT) 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=@linaro.org header.s=google header.b=uNsHyYk5; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240865AbhDLMWV (ORCPT + 99 others); Mon, 12 Apr 2021 08:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240434AbhDLMWU (ORCPT ); Mon, 12 Apr 2021 08:22:20 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D864BC061574 for ; Mon, 12 Apr 2021 05:22:00 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id n138so21089463lfa.3 for ; Mon, 12 Apr 2021 05:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7jGUYvG/VpC5dfomQS+f5L/i07bp1VPDdzETKNMiL1s=; b=uNsHyYk5XOw/ru9fHS2JRlmrhXQ0+AH9AV4jC/P07+q/ZsjeP37Tys7h6eX17FaC1+ uH/cXTES6FoGYRsFVqMuAdP/DBfXpCD0Cr18XAmq24G+F+YM2rVFRtxpSL6qmZMMLsV8 qUYUhkltcPYAYYlIjSRZgMN/MCoVmwrRxmCa9PabGe/iH/3lSd3wcTUDeoccI6DAlEjM 2CTFkuk/mNxyhEU5E2/XYrtcGbpwtRtBTHweAibeOYRnXkSdfLy1Cq128NB4aViM2bw6 B9XkKp5ItdmBJxb8he1i/MOxSHXPYNm0CjJ1KXh4fJKALspIqwG1cagCnmyo/11bJjtG Qpqw== 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=7jGUYvG/VpC5dfomQS+f5L/i07bp1VPDdzETKNMiL1s=; b=OPZVbIZwJl4RIslEFCtxeS4Q6f3lMKBZM9+V9/WOzsdJ+KsRkKpwaL1Vk2gVAQdTYW s95J7cXKJfS7cGrEIgIRbMRmfXdEsXXEcK7698WrsOcXAWxfd8dzmcrGneHMA0DyMxyQ qliR6vHpEpE8xECXdsGoqaaJ4IUSb/QLuJjjlQqtUSwyEeKXYUwa1p/YFqhL0nCmGnxb LyKGCWH/FsCYCUGRBjP7lH2Lz5hk04/nv7HkZo4lQYomOTRMvkhDGiREqakf29WaG0TY uHeosPrZRJLqva+IHsrpEbh7d1WbVwGT0zAG4PeTgwyNy/q+c/At4tTOhFFpCiZE7bON usGg== X-Gm-Message-State: AOAM531CG5OqHZtcmiVC3iGgz1xuDC/mmMmftFELP0evBsNiGeB3qTLG YMfwNrrl5b2pDPQxx3MFzN8Fs7eQ+8qpjqJ05b2Dpg== X-Received: by 2002:a19:4082:: with SMTP id n124mr17935716lfa.154.1618230119272; Mon, 12 Apr 2021 05:21:59 -0700 (PDT) MIME-Version: 1.0 References: <1617341874-1205-1-git-send-email-ego@linux.vnet.ibm.com> <20210412062436.GB2633526@linux.vnet.ibm.com> <20210412093722.GS3697@techsingularity.net> In-Reply-To: <20210412093722.GS3697@techsingularity.net> From: Vincent Guittot Date: Mon, 12 Apr 2021 14:21:47 +0200 Message-ID: Subject: Re: [RFC/PATCH] powerpc/smp: Add SD_SHARE_PKG_RESOURCES flag to MC sched-domain To: Mel Gorman Cc: Srikar Dronamraju , "Gautham R. Shenoy" , Michael Ellerman , Michael Neuling , Rik van Riel , Valentin Schneider , Dietmar Eggemann , Nicholas Piggin , Anton Blanchard , Parth Shah , Vaidyanathan Srinivasan , LKML , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Apr 2021 at 11:37, Mel Gorman wrote: > > On Mon, Apr 12, 2021 at 11:54:36AM +0530, Srikar Dronamraju wrote: > > * Gautham R. Shenoy [2021-04-02 11:07:54]: > > > > > > > > To remedy this, this patch proposes that the LLC be moved to the MC > > > level which is a group of cores in one half of the chip. > > > > > > SMT (SMT4) --> MC (Hemisphere)[LLC] --> DIE > > > > > > > I think marking Hemisphere as a LLC in a P10 scenario is a good idea. > > > > > While there is no cache being shared at this level, this is still the > > > level where some amount of cache-snooping takes place and it is > > > relatively faster to access the data from the caches of the cores > > > within this domain. With this change, we no longer see regressions on > > > P10 for applications which require single threaded performance. > > > > Peter, Valentin, Vincent, Mel, etal > > > > On architectures where we have multiple levels of cache access latencies > > within a DIE, (For example: one within the current LLC or SMT core and the > > other at MC or Hemisphere, and finally across hemispheres), do you have any > > suggestions on how we could handle the same in the core scheduler? I would say that SD_SHARE_PKG_RESOURCES is there for that and doesn't only rely on cache > > > > Minimally I think it would be worth detecting when there are multiple > LLCs per node and detecting that in generic code as a static branch. In > select_idle_cpu, consider taking two passes -- first on the LLC domain > and if no idle CPU is found then taking a second pass if the search depth We have done a lot of changes to reduce and optimize the fast path and I don't think re adding another layer in the fast path makes sense as you will end up unrolling the for_each_domain behind some static_banches. SD_SHARE_PKG_RESOURCES should be set to the last level where we can efficiently move task between CPUs at wakeup > allows within the node with the LLC CPUs masked out. While there would be > a latency hit because cache is not shared, it would still be a CPU local > to memory that is idle. That would potentially be beneficial on Zen* > as well without having to introduce new domains in the topology hierarchy. What is the current sched_domain topology description for zen ? > > -- > Mel Gorman > SUSE Labs