Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp498990pxv; Thu, 8 Jul 2021 07:20:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0OTtC4C5713COPQCIRWp94BN/lrHfZdkn4dTjXUxA6zaifzeMpqByb9a/XFHzcR0x3p3b X-Received: by 2002:a6b:d108:: with SMTP id l8mr23911054iob.65.1625754041860; Thu, 08 Jul 2021 07:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625754041; cv=none; d=google.com; s=arc-20160816; b=UFMTSCGXR3Po+2Cjnfqu22EfQLu18oBhho6wAKGgWsDQjNB/UKEI9bl0Jo5X48Q9V4 7fturhh8WVAPFhChghxTXm6T+1/95ZjhUNW9aIUw5PQcrj6S1+Ih9PkLU0FrSrg/NcNZ Fa73mDB8OxeY0l+8l4Rti0LHuPthjc56XBICU9cIS3tJcodUSH8mSKikY+poXldJe658 VCd13ydGSTfaC1MLiLlm3vmPGaQSylqxDAo+kgCd+Ggy+sarJI9E3Vk5ha/cHYp+JDFk v+y+3Wc6WLHE5IiXc2Swt0IBOWH6R/a93REuLLBp1kxQqxH2vouhFaf+4NyzKLutKSNC AJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yG5M2Svt3PiyFLv9+HYb6BhSHC4U9BWAtuNV31oNFLA=; b=OgOx7kbk2xwM4UdHDq6N16WCkRK1eQDaJZ7/xgBQYiIOKcNpgZu2C92hIGOMgmiAM3 /wsLgIftBcWy/P2A1fcT8CpJYFLFDx6DLPoRtLiErpTxJ8k2DLCcHHna/nzAJOjsXkFQ +K4WsIph9WIxunrn4LR+BAL77qZLig0SB6hquZPOLkfzeutOGcihET5vvQoK4s188Kqt jgvJJnf3D6Ysv14IcBpxy8ZFjDO2rQuK15FuiwQbZhrabeXVVrTxahawqVwUzaon8Vhw IFaVJdzIXlY8iS2+oKqD+PbNlORsKuyAnCdSl86S1aQ9J/z/g0twWDhhJD/abYZoVCM3 zzOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KHos7KKR; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si2356074iol.81.2021.07.08.07.20.29; Thu, 08 Jul 2021 07:20:41 -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=@ibm.com header.s=pp1 header.b=KHos7KKR; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbhGHOWS (ORCPT + 99 others); Thu, 8 Jul 2021 10:22:18 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49876 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbhGHOWS (ORCPT ); Thu, 8 Jul 2021 10:22:18 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 168E3E8x106215; Thu, 8 Jul 2021 10:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=yG5M2Svt3PiyFLv9+HYb6BhSHC4U9BWAtuNV31oNFLA=; b=KHos7KKRRuheuVg+LXaQuKxBnxQzR407xBu0LfDxyqLitqwiIGuz4d3tjSTDIBilGvoB VoMVaaX7j2dmoYjhHN84w9Yf+XffimwaDKKyI16Y/pTMcVzRNtXNMSqjnjM7PQ/RwLEU OE3HyB73Xqe02TS+qsEkVKzjxzREqdSorGrJ0zJ4evlHSDGyjifzLrOXXO+Cdvcr+Yig 5oT+S5q/HNHtbYn2z2IGeOos1iHaFpy8DP5dXndLcaZ0VIaUkVtBp5r4Cd8ExPFmP+yZ 8LXSO60HjFtyie4BTuSSo1S9v83NLu1ya6SSxLJAV6+VNqAgKxROMTzxqzD3TTQAhRUh Jw== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 39p1ybk1k7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jul 2021 10:19:13 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 168E3Vaw016576; Thu, 8 Jul 2021 14:19:11 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 39jfh8t8pf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jul 2021 14:19:11 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 168EJ8JT33816962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Jul 2021 14:19:08 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1385A405F; Thu, 8 Jul 2021 14:19:07 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 93D2CA4059; Thu, 8 Jul 2021 14:19:07 +0000 (GMT) Received: from localhost (unknown [9.145.63.161]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 8 Jul 2021 14:19:07 +0000 (GMT) Date: Thu, 8 Jul 2021 16:19:01 +0200 From: Vasily Gorbik To: Heiko Carstens Cc: Valentin Schneider , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Guenter Roeck , Christian Borntraeger , Frederic Weisbecker , Alexey Kardashevskiy , Peter Zijlstra , Ingo Molnar Subject: Re: [PATCH] s390: preempt: Fix preempt_count initialization Message-ID: References: <20210707163338.1623014-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KHMZ-n4bjk9_5UtBMnmJMnfquCidElZR X-Proofpoint-ORIG-GUID: KHMZ-n4bjk9_5UtBMnmJMnfquCidElZR X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-08_06:2021-07-08,2021-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0 mlxlogscore=893 priorityscore=1501 adultscore=0 mlxscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107080077 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 08, 2021 at 04:17:10PM +0200, Heiko Carstens wrote: > On Wed, Jul 07, 2021 at 05:33:38PM +0100, Valentin Schneider wrote: > > S390's init_idle_preempt_count(p, cpu) doesn't actually let us initialize the > > preempt_count of the requested CPU's idle task: it unconditionally writes > > to the current CPU's. This clearly conflicts with idle_threads_init(), > > which intends to initialize *all* the idle tasks, including their > > preempt_count (or their CPU's, if the arch uses a per-CPU preempt_count). > > > > Unfortunately, it seems the way s390 does things doesn't let us initialize > > every possible CPU's preempt_count early on, as the pages where this > > resides are only allocated when a CPU is brought up and are freed when it > > is brought down. > > > > Let the arch-specific code set a CPU's preempt_count when its lowcore is > > allocated, and turn init_idle_preempt_count() into an empty stub. > > > > Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled") > > Reported-by: Guenter Roeck > > Signed-off-by: Valentin Schneider > > --- > > arch/s390/include/asm/preempt.h | 16 ++++------------ > > arch/s390/kernel/setup.c | 1 + > > arch/s390/kernel/smp.c | 1 + > > 3 files changed, 6 insertions(+), 12 deletions(-) > > Reviewed-by: Heiko Carstens > > Vasily, can you pick this one up, please? Will pick it up right away for rc1, thanks!