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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F201FC001DF for ; Wed, 2 Aug 2023 04:45:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 503CF280125; Wed, 2 Aug 2023 00:45:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B48A280112; Wed, 2 Aug 2023 00:45:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35457280125; Wed, 2 Aug 2023 00:45:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 24EFE280112 for ; Wed, 2 Aug 2023 00:45:24 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DE923B103D for ; Wed, 2 Aug 2023 04:45:23 +0000 (UTC) X-FDA: 81077925726.09.79B06D9 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf24.hostedemail.com (Postfix) with ESMTP id 9DA42180010 for ; Wed, 2 Aug 2023 04:45:19 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=XVMdq8T6; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf24.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690951521; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=i9NN+IMaVHS2ICmf6ro2iorAbo7KSqOZ4HRb1rKzbF8=; b=pMQ8HnajRu1kn0M/6FvdSY78tU9Hpgii42N6zEwu4FitqwzT1WXb/hPnt8Ww3iUsVLc/QE a42g1CwWlc7/9mBneB7DYCkcOn0xyl9HJPrpyMjOWSS1yJjO72U3YHdgRz2TTLLZ1SCCro on1+X7OeA2T1rITxlx432Cx/K2A0EsY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=XVMdq8T6; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf24.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690951521; a=rsa-sha256; cv=none; b=oKgvQBaiHcUdZ1hLUSO6WrdX/wJAsMjJKTVD4lZPUgITiLtPXXXFWcz0P8M3GJQaCUPSN5 AE1Nm6XggQQjsTJcwHQYnz6wPI9ao8QIxYR/nYDibcYV1iCS0OtmgUmuexOQgSzvdmQwzV A+yejAZ//QvNTmUH0KAVxRGAqts60YU= Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3724cQsE030013; Wed, 2 Aug 2023 04:45:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=i9NN+IMaVHS2ICmf6ro2iorAbo7KSqOZ4HRb1rKzbF8=; b=XVMdq8T6xYSC5cXH47IVBSO6AvRjllMIPM0zjsuLnHXjuV+DBUqoXxZLDTc3EcAgQLsR Mz/+j+/YNQG3KPHkKEfui4G9mHJ4ymXg2C4LwmXpwyBk4R0n1lvAVRWxGvJkBhRZa/fs ImIkgbabIt0YXvLOWSivHtIIlp9NiVMvSjRFaCqIYr2ZlIv271NktGkc9yEReRHgGDkb BWMz83r9d+5bbnISrdsul/Lut88O4Q+ZXe+Ra42YD77sjrK+kSMfGufWyWddVWg8TSJO w9UcXoFqhhOaEpVe4GbNWIdhancPk96nk51Vbp81lbO2X2qkkHQ8Ir9UcGRt/JzVdsab 4w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3s7fra0unb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Aug 2023 04:45:10 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3724csOb030687; Wed, 2 Aug 2023 04:45:10 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3s7fra0umh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Aug 2023 04:45:10 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3722qOnM006153; Wed, 2 Aug 2023 04:45:09 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3s5d3sj3sv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Aug 2023 04:45:09 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3724j7lo22151772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Aug 2023 04:45:07 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 680B920040; Wed, 2 Aug 2023 04:45:07 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0220420043; Wed, 2 Aug 2023 04:45:05 +0000 (GMT) Received: from [9.43.11.83] (unknown [9.43.11.83]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 2 Aug 2023 04:45:04 +0000 (GMT) Message-ID: Date: Wed, 2 Aug 2023 10:15:04 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v7 7/7] mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter Content-Language: en-US To: Michal Hocko Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu, Oscar Salvador , David Hildenbrand , Vishal Verma References: <20230801044116.10674-1-aneesh.kumar@linux.ibm.com> <20230801044116.10674-8-aneesh.kumar@linux.ibm.com> From: Aneesh Kumar K V In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: jslBqxdDI7wmB3ZJihTBu6JRQBsdy0QX X-Proofpoint-GUID: kJsFRem3iVPTakEyEESkRhSt632uUhqZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-02_02,2023-08-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 bulkscore=0 adultscore=0 mlxscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 spamscore=0 mlxlogscore=729 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308020040 X-Rspamd-Queue-Id: 9DA42180010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: e6hfr7h38qijkbh3fixusafnxe5yo8rg X-HE-Tag: 1690951519-940652 X-HE-Meta: U2FsdGVkX18u+DIQC6vMwE69lEBGjhQT9dsJf0lv9A+Fx48MKsE5PCTw6ZM6+gfQgXdRGADIB4Rmi2//r5/cg/V8D/TZ0yLHiYWE5nzdbDkrjyxk5FvZ5bBSA910rFwQ9jXWGKVpuhUJyLVTN27+EtLDPopBuMDAHsuIEKGIqipcN/UeBFFaVz1mgwuAajVwtU0z3p3hON2GbkvdK7pTnOGjQLms9GIozdkjxOahvYBDJaRLHkTu5feQmZgG/nyJrWPZJx9wxaVcJ1E/KpsJ/RpQaOEPar2msHo0eHJdfHahorKdbNSNJ2j1j1eLsyRLWrLy+JsW+wzCLl/BgUW1p2lXKvHen4LM6h19LT5398kyvgdr5w6XXxQd/yS+R1ltXazqSHK2fgW3egtgXuS13yeAIu6yCCg7rfnBMZrbPZC9Rv6b4lCDSltBKiBRs7mc1z3aRWwxmBBh9FloI5Rgn/AyyeloAi1TsaOUXJblruHheIJ2bLn4ztKiHL62OnwC6T0p+P62yTs+6ZFfcMOkjxZwS3urFSm9Y3LJaHgygF2tujJRCwH7Shyd8fjnY+BZ2DfV/8KDAXTds92pWOTST2sBbZTUYupJlIT+pGoiF5L444rMALSH/cwSOqSq5CCLzqWiOJWCn5dHh9KxtshfzmKSuNuTgOT+0hcTIPTrCzP7KxKodBJc8fOR98Y8aShZ1wnx+giPWzzDJIaLVpS4oVvEBJjuq/V9VNZRZn+Z/bagaABTB7oe4z6GDQCcY57o+lpQCvEKBprRwLTe5uXkM2w607xxpgQMq5myk9dmQPqUaX1Tew3wwMtzSSnSSoG0bC3/czbifgQvpYiXgT3TscFu9ovgYjpihHUO4tjp2TBVT33FlsBORdv1cjDhuX1E2Xa/Tgjch0yib/p2XJQtI84VB9aCieHeUmbUsQiPCbi4nSvk9NKTAWeFazrcJBdEzFlGk9bZgoLlwQXRXB6 25SUrM5i B6MN28j01zDPMxboDfzivi2oFGB3iMkd74D2ZJPkRx7rXh8+6cSgiy899mFzf/A2zWBOYz8lbt4Ap61XRdNxvFCROWDsEt6H56kVYFC9LxuLdhdFNEXyqUpfHNPc6zBcl7tLbrCIhgAW/gT4ZFEElzII+XDEsQh1BplXsKYEmUHFRTYcokNbCWtnV4Mfx08MLDZj02cP7QREI9oktZgtD6T0azPIX9gC3YS6uKfvzpoAlu8SmxayPM+HUZHnfi+6wcnVkZe983JRfsMJCjujruq7ALw1atnVi//eOXwPNmIzvwOE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 8/1/23 4:20 PM, Michal Hocko wrote: > On Tue 01-08-23 14:58:29, Aneesh Kumar K V wrote: >> On 8/1/23 2:28 PM, Michal Hocko wrote: >>> On Tue 01-08-23 10:11:16, Aneesh Kumar K.V wrote: >>>> Allow updating memmap_on_memory mode after the kernel boot. Memory >>>> hotplug done after the mode update will use the new mmemap_on_memory >>>> value. >>> >>> Well, this is a user space kABI extension and as such you should spend >>> more words about the usecase. Why we could live with this static and now >>> need dynamic? >>> >> >> This enables easy testing of memmap_on_memory feature without a kernel reboot. > > Testing alone is rather weak argument to be honest. > >> I also expect people wanting to use that when they find dax kmem memory online >> failing because of struct page allocation failures[1]. User could reboot back with >> memmap_on_memory=y kernel parameter. But being able to enable it via sysfs makes >> the feature much more useful. > > Sure it can be useful but that holds for any feature, right. The main > question is whether this is worth maintaing. The current implementation > seems rather trivial which is an argument to have it but are there any > risks long term? Have you evaluated a potential long term maintenance > cost? There is no easy way to go back and disable it later on without > breaking some userspace. > > All that should be in the changelog! I updated it as below. mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter Allow updating memmap_on_memory mode after the kernel boot. Memory hotplug done after the mode update will use the new mmemap_on_memory value. It is now possible to test the memmap_on_memory feature easily without the need for a kernel reboot. Additionally, for those encountering struct page allocation failures while using dax kmem memory online, this feature may prove useful. Instead of rebooting with the memmap_on_memory=y kernel parameter, users can now enable it via sysfs, which greatly enhances its usefulness. Making the necessary changes to support runtime updates is a simple change that should not affect the addition of new features or result in long-term maintenance problems.