From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A8EB33E1; Sun, 25 May 2025 13:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748178189; cv=none; b=Y8ovKRxVfyogdYrWcojhcZHMYUPsgNBPwXtTVccoI1H1XqdFgt1UHFLpW5spYhuYgtY0l3Rp3hNKYhliIG/H1206pS1t6KDU4pX/IAyNe9ref0Mn1wwjiYJFSI7qomyJD7su4jLOYQdQ5XFyISkGGBmlLEnDlfCOhaYe3GC97tM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748178189; c=relaxed/simple; bh=/jxNFD1uxET6ASjHePOBoX8RxwFE2d0w0vqZQrlI8H0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ChqTsGlKEnNssSSF8Yar/IV6azwkhNxiihwOAqk5lrTQe7sNZf2WoysLok8N/c+QadFZsowL6vhNcYz2m+1B19IxzvqCLadYZdEIwvfkHQQyVwn+OZpLrSJTAeKVe3+dEDz097hYg068+/gIYC9msTlpNOUqPSN3ifSm5BW8vJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1uJB0C-0006xa-00; Sun, 25 May 2025 15:02:56 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 606E4C00EF; Sun, 25 May 2025 15:02:18 +0200 (CEST) Date: Sun, 25 May 2025 15:02:18 +0200 From: Thomas Bogendoerfer To: Gregory CLEMENT Cc: Huacai Chen , Jiaxun Yang , Vladimir Kondratiev , =?iso-8859-1?Q?Th=E9o?= Lebrun , Tawfik Bayouk , Thomas Petazzoni , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: SMP: Move the AP sync point before the calibration delay Message-ID: References: <20250523-hotplug-paralell-fix2-v1-1-45a9f84587fd@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250523-hotplug-paralell-fix2-v1-1-45a9f84587fd@bootlin.com> On Fri, May 23, 2025 at 09:58:15AM +0200, Gregory CLEMENT wrote: > In the calibration delay process, some resources are shared, so it's > better to move it after the parallel execution part. Thanks to the > patch optimizing CPU delay calibration, this change has no impact on > the boot time improvements gained from CPU parallel boot. > > Signed-off-by: Gregory CLEMENT > --- > Hello, > > After a thorough review, as reported in [1], the CPU delay calibration > is the last potential issue area. However, I believe that with this > patch [2] applied, the source of concurrency will disappear. > > Gregory > > [1]: https://lore.kernel.org/linux-mips/87frgvokga.fsf@BLaptop.bootlin.com/ > [2] :https://lore.kernel.org/linux-mips/20250520-smp_calib-v1-1-cd04f0a78648@bootlin.com/ > --- > arch/mips/kernel/smp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c > index 7901b59d8f60eddefc020cf2a137716af963f09e..4868e79f3b30e9d80fe6390785b297c35d8c02a3 100644 > --- a/arch/mips/kernel/smp.c > +++ b/arch/mips/kernel/smp.c > @@ -371,12 +371,12 @@ asmlinkage void start_secondary(void) > * to an option instead of something based on .cputype > */ > > - calibrate_delay(); > - cpu_data[cpu].udelay_val = loops_per_jiffy; > - > #ifdef CONFIG_HOTPLUG_PARALLEL > cpuhp_ap_sync_alive(); > #endif > + calibrate_delay(); > + cpu_data[cpu].udelay_val = loops_per_jiffy; > + > set_cpu_sibling_map(cpu); > set_cpu_core_map(cpu); > > > --- > base-commit: faefb0a59c5914b7b8f737e2ec5c82822e5bc4c7 > change-id: 20250522-hotplug-paralell-fix2-1bffa02a9529 applied to mips-next Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]