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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC764C352A4 for ; Mon, 10 Feb 2020 20:28:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6F7E20715 for ; Mon, 10 Feb 2020 20:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727518AbgBJU25 (ORCPT ); Mon, 10 Feb 2020 15:28:57 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36290 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgBJU25 (ORCPT ); Mon, 10 Feb 2020 15:28:57 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01AKQkCu022940; Mon, 10 Feb 2020 15:28:53 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1tn32qfs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 15:28:52 -0500 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 01AKQt8X023572; Mon, 10 Feb 2020 15:28:51 -0500 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1tn32qf6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 15:28:51 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01AKNLev004898; Mon, 10 Feb 2020 20:28:50 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04dal.us.ibm.com with ESMTP id 2y1mm6w913-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 20:28:50 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01AKSnC914484346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 20:28:49 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BDF0711207B; Mon, 10 Feb 2020 20:28:49 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3450112064; Mon, 10 Feb 2020 20:28:49 +0000 (GMT) Received: from localhost (unknown [9.41.179.160]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 10 Feb 2020 20:28:49 +0000 (GMT) From: Nathan Lynch To: Scott Cheloha Cc: Nathan Fontenont , Rick Lindsley , linux-kernel@vger.kernel.org, Michael Ellerman Subject: Re: [PATCH] pseries/hotplug-memory: remove dlpar_memory_{add,remove}_by_index() functions In-Reply-To: <20200127200839.12441-1-cheloha@linux.ibm.com> References: <20200127200839.12441-1-cheloha@linux.ibm.com> Date: Mon, 10 Feb 2020 14:28:49 -0600 Message-ID: <87ftfimbjy.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:6.0.138,18.0.572 definitions=2020-02-10_07:2020-02-10,2020-02-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 impostorscore=0 phishscore=0 priorityscore=1501 suspectscore=1 lowpriorityscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002100148 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Scott Cheloha writes: > The dlpar_memory_{add,remove}_by_index() functions are just special > cases of their dlpar_memory_{add,remove}_by_ic() counterparts where > the LMB count is 1. I wish that were the case, but there are (gratuitous?) differences: - dlpar_memory_remove_by_ic() checks DRCONF_MEM_RESERVED and DRCONF_MEM_ASSIGNED flags; dlpar_memory_remove_by_index() does not. - dlpar_memory_remove_by_ic() attempts to roll back failed removal; dlpar_memory_remove_by_index() does not. I'm not sure how much either of these gets used in practice. AFAIK the usual HMC/drmgr-driven workflow tends to exercise dlpar_memory_remove_by_count(). I agree this code needs consolidation, but we should proceed a little carefully because it's likely going to entail changing some user-visible behaviors.