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 5A5F5D1813A for ; Mon, 14 Oct 2024 17:53:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C89706B0083; Mon, 14 Oct 2024 13:53:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C39D86B0088; Mon, 14 Oct 2024 13:53:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ADA206B0089; Mon, 14 Oct 2024 13:53:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8FF466B0083 for ; Mon, 14 Oct 2024 13:53:48 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1F3C7141009 for ; Mon, 14 Oct 2024 17:53:40 +0000 (UTC) X-FDA: 82672955526.25.A740CED Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf12.hostedemail.com (Postfix) with ESMTP id 7ED2240016 for ; Mon, 14 Oct 2024 17:53:42 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=MAWNDWJi; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf12.hostedemail.com: domain of hca@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=hca@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728928321; a=rsa-sha256; cv=none; b=ZLpVgYcffvnAUlL6hoHuJuTSTaV9MhcHPaXTmOlAhAGs3AhrYgr5pFPd55sKHrLYhMPoph HWWdm4D+4lL4aqRDS4lbtPYyY4XkBhqn/vQ+ueFqlDR3KBQq4kaAaP/jnzy8n0iGXUbOCB YNwWagiIlUQ3cNwQ2bpGkp59C1VnbHw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=MAWNDWJi; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf12.hostedemail.com: domain of hca@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=hca@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728928321; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=brLW2EcSwr3dgFdZYov7EsAvpYwfb5CRO99N/OPunA4=; b=4Svu2hOTffm5O8Uq573hvWO4E3hTW3diMHaEmN+NdpAmkZdRYgbRJeyWm3+O/h2Hxzby32 gMeDRJnXO8eVtk6XwKJHFh1dNOmFItXKiG2kU1Gkc8PtUN+sIjSptOE2j0uqiCtr5NFVO7 udCnBy/51OtNwqOdreECX2Uln41ACCc= Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49EHpnhJ032095; Mon, 14 Oct 2024 17:53:44 GMT 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=brLW2EcSwr3dgFdZYov7EsAvpYw fb5CRO99N/OPunA4=; b=MAWNDWJiZRG4uc1TJl8OSC3XFdTTvCXrznd/Ha0VShH wxgDeEO1JHhiA4fNVeZRYmcXUpcYsWa8YNevpkEhEw4wLakdzpXw5fPfM5gqZ5AL lxtfNxAqRXGmX2nZ19xX43YlPHn/53QizNI4UlHrodNROKBuKqwaA/cZAtL8m5sM CQhIukttr9i2wao0GFPvKDuKk7M138WvhHBYi0/QKdhXh2BdLsRh7yNOls0DmfNo zwnXrqoEc2cY7rwOph6xiJrZTSc5u4x717kR/h8v8A00l8HzoA/+ssiXd47JFAF6 vuiKZBIEJSXf5qaxo0XmvKJQG3hxTNnNwFgRJuTJAhQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 42982kg05s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 17:53:44 +0000 (GMT) Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 49EHrhJk003502; Mon, 14 Oct 2024 17:53:43 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 42982kg05j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 17:53:43 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 49EHgPUo027432; Mon, 14 Oct 2024 17:53:42 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4283txfxmh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2024 17:53:41 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 49EHrcwV46203318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Oct 2024 17:53:38 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3480020049; Mon, 14 Oct 2024 17:53:38 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 397BC20040; Mon, 14 Oct 2024 17:53:37 +0000 (GMT) Received: from osiris (unknown [9.171.66.174]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 14 Oct 2024 17:53:37 +0000 (GMT) Date: Mon, 14 Oct 2024 19:53:35 +0200 From: Heiko Carstens To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, virtualization@lists.linux.dev, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Huth , Cornelia Huck , Janosch Frank , Claudio Imbrenda , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Andrew Morton , Jonathan Corbet , Mario Casquero Subject: Re: [PATCH v2 7/7] s390/sparsemem: reduce section size to 128 MiB Message-ID: <20241014175335.10447-B-hca@linux.ibm.com> References: <20241014144622.876731-1-david@redhat.com> <20241014144622.876731-8-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241014144622.876731-8-david@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5D_xC6nknQqUzkF7BmFqB2_0PkJpbEq7 X-Proofpoint-GUID: UKk9TP1S1FoYIjDngHQjul4Nmfsk5MhM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-14_12,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=4 mlxlogscore=143 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1011 impostorscore=0 priorityscore=1501 mlxscore=4 bulkscore=0 spamscore=4 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410140128 X-Rspamd-Queue-Id: 7ED2240016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: s55mqbjom7yf4xckbmhgar7nbrdf46f9 X-HE-Tag: 1728928422-655954 X-HE-Meta: U2FsdGVkX19+PO0W+D9Zi5Jz8HxgXxQxU26Yj2A1jdN1IPAq15i3ivjMTGQMdtL1VVhtDU3qEJiAi8/Sykls4HhzKzxEZxWBqCaa6cbZNRjM2IEEH7dBW8gLQdfBtPEfarKMExCi8fNXQ+aG26L/ZYEcz3mAtvzKW9YVwNls0KBxMqrPk3dMBxld/6ZTdq0jb53Knf+WWfKvCITx8GNe3TWj2lQ3QpQeU9DZi/qLyHWln603ejRDBqqtXoPpvITf0u6k5qhD2O/Um2bGO0zKyjNxOmfkFxI8jDktYKWfj5wYHGGVOuLiXoxejC5WrMDBdGV60FCp7F8AOTA+uakiac2epc4M/fgrv2TFy78lVaICipMYVXi3gX7U3yscH84EQR77eFBG/9SU9eTC0xUHp57OVOFoyI5uRQcQk2sKDai8WXBnt1QQ6M70Yrxsu0eYlsIIh44heyLpwwrcLQm1mOIz9dWFIhPE0lGPDULK3FWP8z0cJYsoCGu9xvcv3+d46PBMWCj7KoF46kpQEYBhSdiHJRG6qlDK0GmHo+6MFmKJkIyDErlSboXP/WLhL3zWSCXVjSHpj8epEBGSb4DTeUjLdOoFQ3+fvrt2LkyWnPODznMJjjwHVXLMLOiuzAoiiWrJ7tgLGFufbcMcHkG3kyT1uXBuvinyE+9Sayd/OLzw+OTRfCytJ6dB43ghktvRWyCgrquIpZA0zoMDOQhM39A6W9R0mFX0Xa6I9bnGsPX399QULZpMx88+mVGcNjNjj6cyJBZz/AEVEEpprmDA1no7idcaKyGXEimECfeYcTObisi5kKj2WlEuxw9XmB1+GDVuAaWZpE+J3xnSWug5d887XgWO7bXcnt6PceFezoXm8KfcKbIPCezXb1ex7x+Iex2qVwgTypVpyQ5+vqazrHBU6nj97McpbdQfJbUoi3RLsbYMat/nZglCFWnNfBvLzNwqOpK6F9Do8A/P65b CS6EpTr9 puo6oUhb8NPPz6ewoyAcqS+WkeFYUKvcoqXjzqE2gs1micNjiDQGDvP0kzBicy1rvwv+WEkUspKKOZXnnrpWtWWLWz4HZUJJrnda7/yW2NxkC2QsHRkZa6vZQ2dZrdZy9m4QHdG+yK3nGD1JOmyFXZMZJk57crc/08fYeqwrU3vkAUwQzSapONwbgqdCjlI9pwJ4LJ06UPycbGWSCIqFJWxTiwHCC38JAlaPT4/SEEDmWjUeaAuB6rT7/yw== 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: List-Subscribe: List-Unsubscribe: On Mon, Oct 14, 2024 at 04:46:19PM +0200, David Hildenbrand wrote: > Ever since commit 421c175c4d609 ("[S390] Add support for memory hot-add.") > we've been using a section size of 256 MiB on s390 and 32 MiB on s390. > Before that, we were using a section size of 32 MiB on both > architectures. > > Likely the reason was that we'd expect a storage increment size of > 256 MiB under z/VM back then. As we didn't support memory blocks spanning > multiple memory sections, we would have had to handle having multiple > memory blocks for a single storage increment, which complicates things. > Although that issue reappeared with even bigger storage increment sizes > later, nowadays we have memory blocks that can span multiple memory > sections and we avoid any such issue completely. I doubt that z/VM had support for memory hotplug back then already; and the sclp memory hotplug code was always written in a way that it could handle increment sizes smaller, larger or equal to section sizes. If I remember correctly the section size was also be used to represent each piece of memory in sysfs (aka memory block). So the different sizes were chosen to avoid an excessive number of sysfs entries on 64 bit. This problem went away later with the introduction of memory_block_size. Even further back in time I think there were static arrays which had 2^(MAX_PHYSMEM_BITS - SECTION_SIZE_BITS) elements. I just gave it a try and, as nowadays expected, bloat-o-meter doesn't indicate anything like that anymore. > 128 MiB has been used by x86-64 since the very beginning. arm64 with 4k > base pages switched to 128 MiB as well: it's just big enough on these > architectures to allows for using a huge page (2 MiB) in the vmemmap in > sane setups with sizeof(struct page) == 64 bytes and a huge page mapping > in the direct mapping, while still allowing for small hot(un)plug > granularity. > > For s390, we could even switch to a 64 MiB section size, as our huge page > size is 1 MiB: but the smaller the section size, the more sections we'll > have to manage especially on bigger machines. Making it consistent with > x86-64 and arm64 feels like te right thing for now. That's fine with me. Acked-by: Heiko Carstens