Received: by 2002:a17:90a:8504:0:0:0:0 with SMTP id l4csp4843108pjn; Tue, 29 Oct 2019 08:31:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzT49nlQQVoxhRXuvpdpCplMwXcs8PGD4SwGoELpx9VotfCNm4BnwMMp03BOMs9cS6yqYiJ X-Received: by 2002:a17:906:3501:: with SMTP id r1mr3723848eja.301.1572363103686; Tue, 29 Oct 2019 08:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572363103; cv=none; d=google.com; s=arc-20160816; b=Ev8zmDz92j7xr+HzD6Xj3xTuY+CD2cb5tj6UrkorkNdgxHf4ptme7lVbiIysxlykjH 7NdbZl6zeYK9ayv+NHugD0whrKZjFLfDYoUB9esfJwVFg+2ZMvzfu9bVHZPIW2KKr7IU Z3BwA/L5F0Um5gXdiuenioHQJGzqZ22FYq/3gzx7vf8aEbvUTCI3Rrwk7JTTSmjj93Vc Z7inOtJX/mTcb187FJ1n4Scdfsn9jxlkxoXqu1byeHG/L89mYeXSf0AI/bASQEAz+51J Km7U7uo1WOaoXouj3QBvbIVt+lBReJED++UdA535pfvKwT8RlW/2Q4KQgKfsk6GlpPaY QBeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=N0HiDGrICVtozJ3U/f80T8lLNuV5E11HjVEA8pBEdwE=; b=0b47e2yygQy7WlVXrndTCibDWNrtb69MXzQqiBvF9L1lkfk2eCMKAicEPRLowh43/5 TNW6IBQizZ475yfSh5bvHnDlipzpe/80EEn/6Y0PgB5axuRL53A3m/3mnLTKJtySXXd1 0oltWknTXMbB6wOAsB9AzGsRKRKtjzD75siokfYryEvYSEHzt+vT1d+yc8zgDLQVqnEB +ch0v8m47I/4N6MJPWf7m5HPxnvq3xU2YZzkFlzSfk+oEws0m1AY+GhcMQCbqnnPTEwY EKb3tvBlS741xK/WyIqYpldcwVglwATfPy3md8aQ2OtWqNMTwQrSq9OSx1LZF6Akpa/K xDWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si8521726ejl.293.2019.10.29.08.31.18; Tue, 29 Oct 2019 08:31:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390117AbfJ2P3r (ORCPT + 99 others); Tue, 29 Oct 2019 11:29:47 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:12672 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389809AbfJ2P3r (ORCPT ); Tue, 29 Oct 2019 11:29:47 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9TFHHVi023631; Tue, 29 Oct 2019 11:29:35 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vxqj4sq6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Oct 2019 11:29:35 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x9TFHV58025388; Tue, 29 Oct 2019 11:29:34 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vxqj4sq4s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Oct 2019 11:29:34 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9TFPh7a021520; Tue, 29 Oct 2019 15:29:33 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma03dal.us.ibm.com with ESMTP id 2vvds83jc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Oct 2019 15:29:32 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9TFTVXI56099266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Oct 2019 15:29:31 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22F316E050; Tue, 29 Oct 2019 15:29:31 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEDA86E04C; Tue, 29 Oct 2019 15:29:30 +0000 (GMT) Received: from localhost (unknown [9.41.101.192]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 29 Oct 2019 15:29:30 +0000 (GMT) From: Nathan Lynch To: Gautham R Shenoy Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Nicholas Piggin , Tyrel Datwyler , Vaidyanathan Srinivasan , Kamalesh Babulal , "Naveen N. Rao" , "Aneesh Kumar K.V" Subject: Re: [PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline In-Reply-To: <20191029111314.GC12266@in.ibm.com> References: <1571740391-3251-1-git-send-email-ego@linux.vnet.ibm.com> <87o8y45sxt.fsf@linux.ibm.com> <20191029111314.GC12266@in.ibm.com> Date: Tue, 29 Oct 2019 10:29:30 -0500 Message-ID: <87tv7rlgdh.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-29_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=815 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910290142 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gautham R Shenoy writes: > On Fri, Oct 25, 2019 at 06:03:26PM -0500, Nathan Lynch wrote: >> "Gautham R. Shenoy" writes: >> > This is the v2 of the fix to change the default behaviour of >> > cede_offline. >> >> OK, but why keep the cede offline behavior at all? Can we remove it? I >> think doing so would allow us to remove all the code that temporarily >> onlines threads for partition migration. > > May be I am missing something. But don't we want all the CPUs to come > online and execute the H_JOIN hcall before performing partition > migration? How will this change whether the offlined CPUs are in > H_CEDE or rtas-stop-self? The platform considers threads in H_CEDE to be active. It considers threads that have performed stop-self to be inactive until they have been restarted. The Thread Join Option section of the PAPR says active threads must perform the H_JOIN. I have confirmed with hypervisor development that this implies that the OS needn't involve inactive threads in the join/suspend sequence. It isn't quite explicit in the log for 120496ac2d2d ("powerpc: Bring all threads online prior to migration/hibernation"), but it stands to reason that using cede for offline is the reason that the code to online all threads for join/suspend was introduced in the first place.