Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2483699ybi; Thu, 18 Jul 2019 09:06:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq3L/8A276jDW7e3TkMDrHAY0EOx/N8LISoV/4oqeOzUth1Ua7yycVT7IIpmU0gXNlcsWW X-Received: by 2002:a65:64c4:: with SMTP id t4mr14531812pgv.298.1563465983546; Thu, 18 Jul 2019 09:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563465983; cv=none; d=google.com; s=arc-20160816; b=MuvcuD2jOg3b9S6Q1aZarFPyDzjuXQpvxKu959H5n8DMjZwRlENRdDzT09w6+Hh7mr oAC6glK69ta01GuAs6tJHUE20tluSgQGIAPmwjZYVtFrz69ZR0bb6+K0ugXaU9/oixEt byqDlNImrPOYAmOydb3MNgFsxi/3o70m++2EHyUourqYC+Vv07eFSuOVYdH+tz8SSHnm +CHBvNfWxk2VEl/Z2F+ULAzQWFt/LBS0aezL6TrbfQ5VxvwgR/elGOVxQH5qKrggpTjg kiLsNTYU5SuGCX1YZbjZ4AbfMc3u6kQN0GZG+gDQxc/0tSaccFg38v4kRXrZcyF0WcvE F3tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=NkxStK6Ejgq6UOe28qo0AqADLr5RHlwFP0zeeq2xsB4=; b=brmOKhq1JtfI5C91NTOT85tATpEX9vQszdUWIqcpqnLgCEu4DJyJDSilwayL6U3Y6o 1glzV89/WY4CVf6pag8EqcpoJ9oBv51sFZbnZBuSsOqsA/KOoMgV5UHyv+uCxNtvX8Yc YZnX9BnD0N+3suKU0zr2dsh8I6MnDPUrgSzHwNp8hWYuEUiQKGrqY2JAnv36TR++o6K2 fwYru1FgT9monaFxFmDGKO2mNeMOfYPrpcvoHFPhtLbucwv5pmVk7YQMsJf4OGrly84t 86TX74LQVIOSfXunWTSBxpeoI9nfQ+AZYLBXdEOptd/3XsR0CZg3x3rFK1GGB3d5vQs5 Wn8g== 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 v136si28053430pfc.9.2019.07.18.09.06.06; Thu, 18 Jul 2019 09:06:23 -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 S1729802AbfGRQEs (ORCPT + 99 others); Thu, 18 Jul 2019 12:04:48 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56524 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbfGRQEs (ORCPT ); Thu, 18 Jul 2019 12:04:48 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6IG3goE141977; Thu, 18 Jul 2019 12:04:10 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ttum1gyec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2019 12:04:10 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x6IG3txi143659; Thu, 18 Jul 2019 12:04:06 -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 2ttum1gy1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2019 12:04:05 -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 x6IFxlLf016144; Thu, 18 Jul 2019 16:03:47 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma03dal.us.ibm.com with ESMTP id 2tq6x7rhnm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2019 16:03:47 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6IG3ll847120804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Jul 2019 16:03:47 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E89D8AC05E; Thu, 18 Jul 2019 16:03:46 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB94EAC059; Thu, 18 Jul 2019 16:03:43 +0000 (GMT) Received: from LeoBras (unknown [9.85.162.151]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 18 Jul 2019 16:03:43 +0000 (GMT) Message-ID: <6cd8f8f753881aa14d9dfec9a018326abc1e3847.camel@linux.ibm.com> Subject: Re: [PATCH 1/1] mm/memory_hotplug: Adds option to hot-add memory in ZONE_MOVABLE From: Leonardo Bras To: Pavel Tatashin Cc: LKML , linux-mm , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Mike Rapoport , Michal Hocko , Pavel Tatashin , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Thomas Gleixner , Pasha Tatashin , Bartlomiej Zolnierkiewicz Date: Thu, 18 Jul 2019 13:03:42 -0300 In-Reply-To: References: <20190718024133.3873-1-leonardo@linux.ibm.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-Y7h9unj5YKv7mDCLzT7g" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-18_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907180167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Y7h9unj5YKv7mDCLzT7g Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2019-07-18 at 08:19 -0400, Pavel Tatashin wrote: > On Wed, Jul 17, 2019 at 10:42 PM Leonardo Bras w= rote: > > Adds an option on kernel config to make hot-added memory online in > > ZONE_MOVABLE by default. > >=20 > > This would be great in systems with MEMORY_HOTPLUG_DEFAULT_ONLINE=3Dy b= y > > allowing to choose which zone it will be auto-onlined >=20 > This is a desired feature. From reading the code it looks to me that > auto-selection of online method type should be done in > memory_subsys_online(). >=20 > When it is called from device online, mem->online_type should be -1: >=20 > if (mem->online_type < 0) > mem->online_type =3D MMOP_ONLINE_KEEP; >=20 > Change it to: > if (mem->online_type < 0) > mem->online_type =3D MMOP_DEFAULT_ONLINE_TYPE; >=20 > And in "linux/memory_hotplug.h" > #ifdef CONFIG_MEMORY_HOTPLUG_MOVABLE > #define MMOP_DEFAULT_ONLINE_TYPE MMOP_ONLINE_MOVABLE > #else > #define MMOP_DEFAULT_ONLINE_TYPE MMOP_ONLINE_KEEP > #endif >=20 > Could be expanded to support MMOP_ONLINE_KERNEL as well. >=20 > Pasha Thanks for the suggestions Pasha, I was made aware there is a kernel boot option "movable_node" that already creates the behavior I was trying to reproduce. I was thinking of changing my patch in order to add a config option that makes this behavior default (i.e. not need to pass it as a boot parameter. Do you think that it would still be a desired feature? Regards, Leonardo Br=C3=A1s --=-Y7h9unj5YKv7mDCLzT7g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEMdeUgIzgjf6YmUyOlQYWtz9SttQFAl0wmF4ACgkQlQYWtz9S ttTsWg//UPkI4eNdk7scQR2PRPAkZjgxrWG7nyrz1Aialac0oPIjqMV5q78zbrs+ tb9kezvYw+fsseOUJqgPv/MpEG4HtnZUNIugIMT6+S0Xn/W834Dk2LEdEEk6pjS0 +mbeaJr+bABCtzx5GUw55ah/oIMBC3u/TVW/HlcPbQ5hwcRt4mZ9LPbDkrJo7EN1 RMY6Bx3PilG27MaQ8hm/S5aN0XZUl8E1STs78uU7Et6wAm6P2o5+4BhMXQedHNk1 bQkI87P+gzvaVFaEijc/Os41BNwlOLDLzm8eO6VamobF5DkTawp+M8ZppRpDQrI4 a4WWzP9zydkvzlJRVtzhhvA20SjGBg9cqghmSM9i/o0GDCMeccLdcKLYSy7MHRje yqkaVp8pN1BJtVtbnpi8I6r+u57EDtexOg+ScMzl23b0gfmybpRnXk5DvKrtyWkZ C+0Pi+ZMGVXSZHYO2hJhsbBiAXaGo1MhCic33e9hQYHhTA7gfoVfcejBOTGCDUpR U1J9NikqQQo0aqQqonCmh9G3WMDnz0sqmklai+6WXEtuYBaGlVWmT5GqD5c3E4tA wn6KoKd/tooZdRO8pQHtToLgrP+jUdb9ZwhfneCxSMKZPtN/AXxryQUeiTdnKufZ JbnrUDxPwwlLYgsvVfoYW8BhJh7IA4b+akGjtEcw/BqHKNWlxG0= =VsNx -----END PGP SIGNATURE----- --=-Y7h9unj5YKv7mDCLzT7g--