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 95CD4C54E58 for ; Mon, 25 Mar 2024 11:17:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D242B6B0082; Mon, 25 Mar 2024 07:17:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD2F76B0083; Mon, 25 Mar 2024 07:17:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B73D76B0085; Mon, 25 Mar 2024 07:17:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A78406B0082 for ; Mon, 25 Mar 2024 07:17:15 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7955C1C0E9A for ; Mon, 25 Mar 2024 11:17:15 +0000 (UTC) X-FDA: 81935310030.09.C601244 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf05.hostedemail.com (Postfix) with ESMTP id EBBED10000B for ; Mon, 25 Mar 2024 11:17:12 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Z6Yzd1cB; spf=pass (imf05.hostedemail.com: domain of hca@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=hca@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711365433; a=rsa-sha256; cv=none; b=mECK0hP3ubT9j/fdIhcLyoEPeKhsGtEsaPPHPxbP7NXWVGI1UOD2V9sTWMixKZJdwtzcyo zyE3t3AUKA9i27WMiCQInii/+N4Q4MHAC3LnGZp7ghLa3JTtR1BTYH9byYazl2MR2WJnHG CuHrq4l4RxL7yvYzIk2Oqtm1LhQhLeY= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Z6Yzd1cB; spf=pass (imf05.hostedemail.com: domain of hca@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=hca@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711365433; 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=gnlObX30DW5far9dp1Z99mKsThU4aayO+Gtb5tKOmSI=; b=Sj4m1GE5QeSJwU51xE5XehGo7QJvpe9wTCkJVdKi7wTIsWV2Zh0dJgLLPxTxEehUeAfNhs K1uwiQVLCT8/E7+r0Hkp+IAHWs2FhqHlA7yVBBeWWi1+BRcJivvw3RZeiJfcbzjjipOqJv wi5x4Gawn6CQIJTDPsWjEZIQztk2Rdk= Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42PABpYj018665; Mon, 25 Mar 2024 11:17:00 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=gnlObX30DW5far9dp1Z99mKsThU4aayO+Gtb5tKOmSI=; b=Z6Yzd1cBtfCsA+QXnMdad8suUWDjqfS6kHIuWJHefO4QmTufqbLsVMMKn+g3dTk69wQ0 1JRBa36VohbinjvUr69kB9bxqMX2lXO9YgiMTOfjPz0Fjx9Z5gdI9gZ3Y5BmjH/RSJzX mk4fmWuchs4dO3zZkWzIHqMH0ZPTHHv5KSTOvSdvQoYZXa0P+mCfXbVYGdYoxS5KKbUl ulj0k9se7l0i6KNxCvi2CDizfnA81CCuEBQ7EXZginqQirQrwijhrmdDK1cVgk+AQTo7 KY60o1/FReCzxVlL4ABo7R3S1yBnC0E8JnmyG4RzWHjoF7Swvk/9jww5cU05/7OERkoa uQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3x2g8f26c9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Mar 2024 11:16:59 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 42PBGxxW020737; Mon, 25 Mar 2024 11:16:59 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 3x2g8f26c6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Mar 2024 11:16:59 +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 42PAUVRs016605; Mon, 25 Mar 2024 11:16:58 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3x29dts0yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Mar 2024 11:16:58 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 42PBGrdd49414524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Mar 2024 11:16:55 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFB6D20049; Mon, 25 Mar 2024 11:16:52 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0819120040; Mon, 25 Mar 2024 11:16:52 +0000 (GMT) Received: from osiris (unknown [9.171.70.91]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 25 Mar 2024 11:16:51 +0000 (GMT) Date: Mon, 25 Mar 2024 12:16:50 +0100 From: Heiko Carstens To: Baoquan He Cc: Christoph Hellwig , "Uladzislau Rezki (Sony)" , linux-mm@kvack.org, Andrew Morton , LKML , Lorenzo Stoakes , Matthew Wilcox , Dave Chinner , Guenter Roeck , Oleksiy Avramchenko , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Subject: Re: [PATCH 1/1] mm: vmalloc: Bail out early in find_vmap_area() if vmap is not init Message-ID: <20240325111650.16056-A-hca@linux.ibm.com> References: <20240323141544.4150-1-urezki@gmail.com> <20240325093959.9453-B-hca@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: EjOA8Cp1wiUgikrGT4ebHRtCz_cnePdL X-Proofpoint-ORIG-GUID: KiB6oDil0a2tliOO39RSi9iLVP9OPhLD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-25_08,2024-03-21_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 mlxlogscore=475 spamscore=0 impostorscore=0 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403210000 definitions=main-2403250062 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: EBBED10000B X-Stat-Signature: fe6fji577f64n3aux7ckbzq8koki5gmb X-Rspam-User: X-HE-Tag: 1711365432-479959 X-HE-Meta: U2FsdGVkX1/qgQQOmkPStk1ZpW0GgExQqB7+3WljLzpcMXug74WHdtCq3DP+JxSEMdvSGe9kKi+EnvGFFJOLaTNfALz1t1cub7W7L4vfPCvfjg0HoDlL1f822WyQOKZyZNJemFh4YiXTlCO9t+0O4K4mD6dYRy7DRsdt5pxEIG6LgKm9WIhQaptYpGmR5G/CaznEd1frfdjQqmFhWC/e8Hv89sc5g+sEt/m0ttaCNPdV15fvcpaHZ7cuxHNL/f9+iD64C3yvHNxsTfrUCqIY9q/ayFte5MWIUMfkrhlZasmUWzWLtsWXO/n7vAc3SlFbRW4N7SDZG/+5xcEIYNof5+XF9zgfwXcOdICvpwF6JHgnbsXBGp794NAs0IIAigNBTngQO8PqGDOze3zxIK0yBwBYXBfOjpSF/nGJS4P+WwpjIqHGDP5ZDmhfbl3ldykRwzz5YsnRSJBXVjxRmrHpSSPTPivO2iQhM/Cyh2b8XAUa7B7qVjRS43VtuTUXpJCPAcpmFraFfdganHdK35ZjqaYpGGo9KwXVeVgA0Avp2IGW68Us2L0w9SLJ4Z/d+6umA1OU3VAqvDAPefkjSU0jijluJR+Jt0PldogeImmqrTnsYnI4T6dUloQ4Kfpa31H8ypUkRoL8H1LQjSXRW5BeNYXSvl18vbntTuS42wUXg6bdNhUKp01hdf7xcXKnHxfmifrLvmMt2LAxHNm3NV0JMgj5pSYN/CKZwTHoolatupZtY5uQyf7NITiavNfbtI13cXGTovtLbxOM1yOEjbqFccuD8t6hdsccnPFSKnTqNnGw5uWotvicjM/my9X5/x2NKtdnIPy7MbM7WVnLdLteYXhUdSUTd721i3fHR33R1xlzE1U8oyEqV5uyouz/pj3kHi+oDtwmzKl6l+S3fqoEEeEwQHxeqLZrAZsLkoyiWrSx7EmeCnBIoqr0nN/xlJYtT6m0levhHkcg69NSxbz 8F78OdfI nRl6QoYUL5appaR6jLGyxUHbd4W9iahcDyCVpBKKHC2qS1tlf8DgxIJ/djFn0cEfI/OFaag/VE0hjhPm/uv6B7uVxLHyCalF1ZaR9gPW76iT/khUKnfbVRl2LoyuR0Mem+BQfqxzbOr3JfuAmREg5LxnYZl57nbHBe/kcMzV4J6RkSYY7MSvs5N3442IgkiulY0tROmTaxI0GuOTukKqW1IdZpYXmhqHFsxMd7b8kIDAWAjAlEDde7aWGDbEKylgN/aspCCt2lDkESMesPNiSyyzysSQF75ppxcvhUM5kSZMeppg= 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, Mar 25, 2024 at 06:09:26PM +0800, Baoquan He wrote: > On 03/25/24 at 10:39am, Heiko Carstens wrote: > > On Sun, Mar 24, 2024 at 04:32:00PM -0700, Christoph Hellwig wrote: > > > On Sat, Mar 23, 2024 at 03:15:44PM +0100, Uladzislau Rezki (Sony) wrote: > ......snip > > > I guess this is ok as an urgend bandaid to get s390 booting again, > > > but calling find_vmap_area before the vmap area is initialized > > > seems an actual issue in the s390 mm init code. > > > > > > Adding the s390 maintainers to see if they have and idea how this could > > > get fixed in a better way. > > > > I'm going to push the patch below to the s390 git tree later. This is not a > > piece of art, but I wanted to avoid to externalize vmalloc's vmap_initialized, > > or come up with some s390 specific change_page_attr_alias_early() variant where > > sooner or later nobody remembers what "early" means. > > > > So this seems to be "good enough". ... > > Add a slab_is_available() check to change_page_attr_alias() in order to > > avoid early calls into vmalloc code. slab_is_available() is not exactly > > what is needed, but there is currently no other way to tell if the vmalloc > > code is initialized or not, and there is no reason to expose > > e.g. vmap_initialized from vmalloc to achieve the same. > > If so, I would rather add a vmalloc_is_available() to achieve the same. > The added code and the code comment definitely will confuse people and > make people to dig why. So after having given this a bit more thought I think Uladzislau's patch is probably the best way to address this. It seems to be better that the vmalloc code would just do the right thing, regardless how early it is called, instead of adding yet another subsystem_xyz_is_available() call. Alternatively this could be addressed in s390 code with some sort of "early" calls, but as already stated, sooner or later nobody would remember what "early" means, and even if that would be remembered: would that restriction still be valid?