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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9497C433EF for ; Wed, 30 Mar 2022 16:09:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l/z+b1MltmZPKnj2DcBLGmBX3WhtEamX9E9E3mgcy8w=; b=poyStryZhP9zOf ru2bCpk35FWzbk+xjrfJtyKRrosfSylgWn6c7rI/H8R3laSTJ2yypdfSw5uyHePfVLjev+pwyo+LW DOBqWob7Wj7DP0TXbPgc0znAM2U2w74A6Z60RgVqkkflm+H6z1GbA2ZKqNBwvognJy0+Ap7YqJpgk SjGjPN3t0Gf8E1XwclZFA1nDama1k9MiBznVWkH9i42kdtgKlh1CabvSwICOcJ7/hrXT90PUP3E5y tl4/g8g+Jg53eU9tOq5lzNa33g+6fcE3g9Ju0Rq+RUYHVaDtjOvp7TuGWvCRcchqAGC0DfsbBpFEJ N4fw3WQVjQ2qqLL0V9Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZarf-00Gm8o-WF; Wed, 30 Mar 2022 16:08:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZarb-00Gm7e-Gu for linux-arm-kernel@lists.infradead.org; Wed, 30 Mar 2022 16:08:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648656482; 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=NI8QrfZLscN2JjuLOs2lOv/NiQshgCTnf9s4dBqvuvY=; b=WYWGrMlFnH+vtd1drK8Kw2qBn2dzI8fs/jZUBoaqGOV+T2eWu2Y5hEffYgvXmeEi/AMfvl bNnrFjvYokq/7GXhtugW8HGl2NWapX4UeHYyxmyOqg+VzaPvU0/A7HV3vZtyjwzc53RzXh cIKlTb4j9Cg1OeNHGodzTZ+0dJ/a1i0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-477-oWzPjiWbMviNabh8l__c2A-1; Wed, 30 Mar 2022 12:07:55 -0400 X-MC-Unique: oWzPjiWbMviNabh8l__c2A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5EA2680352D; Wed, 30 Mar 2022 16:07:55 +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 2BB39C202CA; Wed, 30 Mar 2022 16:07:55 +0000 (UTC) Date: Wed, 30 Mar 2022 12:07:53 -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] arch/arm64: Fix topology initialization for core scheduling Message-ID: <20220330160753.GA17246@pauld.bos.csb> References: <20220322160304.26229-1-pauld@redhat.com> <1a546197-872b-7762-68ac-d5e6bb6d19aa@arm.com> <5a5381cd-813d-7cef-9948-01c3e5e910ef@arm.com> <5dc3a40e-f071-3ac8-4bf0-f555b9d94ff1@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5dc3a40e-f071-3ac8-4bf0-f555b9d94ff1@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220330_090803_647610_2AF6700E X-CRM114-Status: GOOD ( 32.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Wed, Mar 30, 2022 at 05:48:34PM +0200 Dietmar Eggemann wrote: > On 29/03/2022 21:50, Phil Auld wrote: > > On Tue, Mar 29, 2022 at 08:55:08PM +0200 Dietmar Eggemann wrote: > >> On 29/03/2022 17:20, Phil Auld wrote: > >>> On Tue, Mar 29, 2022 at 04:02:22PM +0200 Dietmar Eggemann wrote: > >>>> On 22/03/2022 17:03, Phil Auld wrote: > > [...] > > >>> This instance is an HPE Apollo 70 set to smt-4. I believe it's ThunderX2 > >>> chips. > >>> > >>> ARM (CN9980-2200LG4077-Y21-G) > >> I'm using the same processor just with ACPI/PPTT. > >> > > > > Maybe I'm misinformed about these systems having no PPTT... > > > > I'm reclaiming the system. Is there a way I can tell from userspace? > > # cat /sys/firmware/acpi/tables/PPTT > pptt.dat > # iasl -d pptt.dat > # vim pptt.dsl > I don't have iasl but # strings pptt.dat PPTT ServerCL CAVM So that looks like it has a PPTT entry. Cheers, Phil > [...] > > >> so no SMT sched domain. The MPIDR-based topology fallback code in > >> store_cpu_topology() forces `cpuid_topo->thread_id = -1`. > > > > Right. So since I'm getting SMT it must not have package_id == -1. > > In which case you should be able to reproduce it because it must > > be that the call the update_siblings_masks() is required. That > > appears to only be called from store_cpu_topology() which is > > after the scheduler has already setup the core pointers. > > > > The fix could be the same but I should reword the commit message > > since it should effect all SMT arm systems I'd think. > > > > Or maybe the ACPI topology code should call update_sibling_masks(). > >> > >> IMHO this is why on my machine I don't see this issue while running: > >> > >> root@oss-apollo7007:~# stress-ng --prctl 256 -t 60 > >> stress-ng: info: [2388042] dispatching hogs: 256 prctl > >> > >> Is there something I miss in my setup to provoke this issue? > >> > > > > Make sure you have a stress-ng that is new enough and built against > > headers that have the CORE_SCHED prctls defined. > > Ah, I was using a pretty old version 0.11.07. Now I switched to 0.13.12 > which includes: > > 9038e442b92d - stress-prctl: add Linux 5.14 PR_SCHED_CORE prctl > > To get SCHED_CORE activated in stress-prctl.c, as a quick hack, I had to > add the definitions of PR_SCHED_CORE, PR_SCHED_CORE_GET, etc. to this file. > > Now the issue you described triggers on this machine immediately. > -- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel