Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp450083pxb; Thu, 31 Mar 2022 09:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaNgAE925ndO/ygCpkRRKVmVLvjiQVTea6Ed9n0FMsewb/tTnwHwxajCB3CnVw807rKagh X-Received: by 2002:a17:902:c9c2:b0:154:68e7:7c5a with SMTP id q2-20020a170902c9c200b0015468e77c5amr42113634pld.122.1648742572767; Thu, 31 Mar 2022 09:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648742572; cv=none; d=google.com; s=arc-20160816; b=nupe3SUUI3rf6Bs/fUAQ9lf6QqvH9YjQwkyE8AXgA4e0lJzZR9j1WkQoKvzntc0wZE 1f5U4wcbhzjFUau4o9/59Ukz7nTJ/yckxdOO7Xn3Mci4RkKJ5jPXUA8alKMUSiKkNWs8 wjeB9IYh55M3LXQaWnvx3yS/ulW1+HgForBpDiViBwytYyZmJV+YrNxnhBCewFILXKgc w3kxnjspfL0/8dhW7mrcYXKk101jjlf5NnJxLx7nihIO1GdcZ0qhjGlsT662xGZ0zlzv WPM5dUUtSpZcRtHW/fVaTlfvouNQF9ooLAopJ2j0vvFiSHfRPsF/PeJJy4eoMDUz3v4M cuxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=I22K+0AWk04cNGfWA9Hth1qEi92pTMOHvjJAicv6x14=; b=T3ajb3njVetWasmK9r+B1i433dQ553nB7iWsBmeGMUKAHDWECnjwRzmNTrImN50eSq tjjezflntuiciuvAdAsQFDkFlE6gBAWXSif6gsEQu0OWXf5Vd4qzZJfRJ8HHi5yxbG8Z iPFAISZN9dlZ9KOoQ5Pm84l0kf+6IkZmQ75JTB0OYKgzrgWzz05xIGOPk/fTDDadRepI DFvQQXQ+nz5lXo4gy8H9I+2nj5eLJdzd9a/ajm3qSWqw9+HbvdL1Kvl6yCy/uJsyHmsv dhRi4sxRvfJFfkduH2/VMyqEAvIaJLUc1uJv6eRV4GSf80+CrxqBBeoWxhF8SJrUpRA8 0dzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itsNFNcx; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a631550000000b003980a159ec6si22466959pgv.720.2022.03.31.09.02.37; Thu, 31 Mar 2022 09:02:52 -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=@redhat.com header.s=mimecast20190719 header.b=itsNFNcx; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237861AbiCaOzl (ORCPT + 99 others); Thu, 31 Mar 2022 10:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233106AbiCaOzi (ORCPT ); Thu, 31 Mar 2022 10:55:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 878A81E3FA for ; Thu, 31 Mar 2022 07:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648738429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I22K+0AWk04cNGfWA9Hth1qEi92pTMOHvjJAicv6x14=; b=itsNFNcxwZDZOlFr0r0kwzI9GVwzlZzDsfRV+SaDzVfATCoDo4MtXMVIotDF8aFRQ6r4RJ oi6nwI2/5kiPtwQkh4j3QN3Ks8V9pBdpy+Ho/EFhfie5IspogObxOnBbE2Uh/1XkPKJsOA GzJTpi3NgtiRg2svKLcvghUmx9NI2cQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-103-RmpnAkKPP1qo9QPp9XDWfg-1; Thu, 31 Mar 2022 10:53:46 -0400 X-MC-Unique: RmpnAkKPP1qo9QPp9XDWfg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B66543C14854; Thu, 31 Mar 2022 14:53:45 +0000 (UTC) Received: from pauld.bos.csb (dhcp-17-51.bos.redhat.com [10.18.17.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 84D871400B18; Thu, 31 Mar 2022 14:53:45 +0000 (UTC) Date: Thu, 31 Mar 2022 10:53:44 -0400 From: Phil Auld To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Peter Zijlstra , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] arch/arm64: Fix topology initialization for core scheduling Message-ID: <20220331145343.GF17613@pauld.bos.csb> References: <20220330155611.30216-1-pauld@redhat.com> <66f29bee-e26c-b40e-c3af-79d5297565d8@arm.com> <20220331132103.GB17613@pauld.bos.csb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Thu, Mar 31, 2022 at 04:37:50PM +0200 Dietmar Eggemann wrote: > On 31/03/2022 15:21, Phil Auld wrote: > > On Thu, Mar 31, 2022 at 11:04:31AM +0200 Dietmar Eggemann wrote: > >> On 30/03/2022 17:56, Phil Auld wrote: > > [...] > > >> Ah, the reason is that smt_mask is not correctly setup, so we bail on > >> `cpumask_weight(smt_mask) == 1` for !leaders in: > >> > >> notify_cpu_starting() > >> cpuhp_invoke_callback_range() > >> sched_cpu_starting() > >> sched_core_cpu_starting() > >> > >> which leads to rq->core not being correctly set for !leader-rq's. > >> > > > > Exactly, sorry I was not clearer. smt_mask must be setup correctly > > by the time sched_core_cpu_starting() is called. (Maybe I should crib > > some of the above lines into the commit message?) > > Yeah, maybe, it wouldn't hurt I guess. IMHO mentioning stress-ng's prctl > needs PR_SCHED_CORE support could also be handy since today's stress-ng > packages don't seem to have this yet. > My scripts clone it so I did not realize that was not in prepackaged versions yet. But that said, that's really just a way to tickle the problem. Anyone using core scheduling on such a system will hit this (at least the WARN part, the actual crash was harder to create w/o all the threads and tasks stress-ng uses). I can send a v3 with a further commit message update. Cheers, Phil --