From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C8DA440C for ; Fri, 3 Jan 2025 02:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735869744; cv=none; b=GFV3++OLKAanwmqCaIlV4M8EedG3OT+X5jmgW+4XwXYuSp3jpjO6+A2mNWQxzxMjO1CsoKKvpFEq+7qYLbwyl6ZUA3H3irYrrD1TlF8eEwNpGkFt04golm7LLpC63if1S5TF5X/ju53f7ZQ7hxieJv72+kZ2NgbOVkJhZ+PeJhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735869744; c=relaxed/simple; bh=/u9hYzMEVeu45QjhvSR5gx3BCrKzzWcDijIxc/0GHKM=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=FlzjJTd/PYG7R2MM1s+Xc4y7BYVVPbF3xj8QIsMvydpk05jGCqd57gNTE46QvXkbXUf993vU0vdJksv96Q3g/TZUhlIu6ra9+BzRXpFjYiu+7ygKGKryjkCcrcbjTCortx3dbPRUxrqmCeLgK8GZ/CAGvDWOurpRdJ9oheAJ+N8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=X+l/p2UM; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="X+l/p2UM" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 502MjGrv030058; Fri, 3 Jan 2025 02:01:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= L3aeWnL+12/YsEuMWwQA9FCOS4/Unmsm+NwfFhN0+ws=; b=X+l/p2UMoNpaqmYP 5xWNr+7/MLxdD+aHtA4kJpy1D0nvMZSRPxSNQdX6F6+pk40NPQHRUg2Ju+D+bheF tE4biI11kWpm35nwh40hDkMvxP+Ut9NaejZXOlPyC63QOwxfgCco5i0Rx3u2fDgs 38dImeKU6UER4dZVBZCM0xJSiIZjF5KCcUY5lZnR9yuypvXMZTw0t4Dn7ROXsxn0 rVwBqCFzTt5jlVZ4sojNpD+7ylLqNXhUeueuhd4bZe/2WA8EZxcuaNuJgOoc+K9b XgNS+eKIF/+Bvz0OLnbcPio0QSHwKrpoZSVjhPwn2AcnGaban++KEaRPB1frBvPr q2Qydw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43wvrbs7n1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jan 2025 02:01:58 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50321vWO016498 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 Jan 2025 02:01:57 GMT Received: from [10.239.132.245] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 2 Jan 2025 18:01:54 -0800 Message-ID: <6731e921-8ebd-4e98-a582-ca87f2a25d16@quicinc.com> Date: Fri, 3 Jan 2025 10:01:52 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] arm64: mm: vmemmap populate to page level if not section aligned To: Catalin Marinas , Anshuman Khandual CC: , , , , , , , , , , , , Tingwei Zhang References: <20241209094227.1529977-1-quic_zhenhuah@quicinc.com> <20241209094227.1529977-2-quic_zhenhuah@quicinc.com> <971b9a05-4ae0-4e6c-8e48-e9e529896ecf@arm.com> Content-Language: en-US From: Zhenhua Huang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hDiWL_UumTYIOeHeMpZYw2bGtgztivbf X-Proofpoint-ORIG-GUID: hDiWL_UumTYIOeHeMpZYw2bGtgztivbf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501030015 On 2025/1/3 2:58, Catalin Marinas wrote: > On Fri, Dec 27, 2024 at 01:19:30PM +0530, Anshuman Khandual wrote: >> On 12/24/24 19:39, Catalin Marinas wrote: >>> On Tue, Dec 24, 2024 at 05:32:06PM +0800, Zhenhua Huang wrote: >>>> I have two ideas: >>>> 1. Completely disable this PMD mapping optimization since there is no >>>> guarantee we must align 128M memory for hotplug .. >>> >>> I'd be in favour of this, at least if CONFIG_MEMORY_HOTPLUG is enabled. >>> I think the only advantage here is that we don't allocate a full 2MB >>> block for vmemmap when only plugging in a sub-section. >> >> Agreed, that will be the right fix for the problem which can be back ported. >> We will have to prevent PMD/PUD/CONT mappings for both linear and as well as >> vmemmap for all non-boot memory sections, that can be hot-unplugged. > > I haven't read your diffs below yet but why not allow PMD mappings of > the hotplugged memory (not vmemmap)? SUBSECTION_SHIFT is 21, so we can > have 2MB blocks in a 4KB page configuration. > Oh, Understood. We discussed the topic and I shared the same concern, Anshuman actually preferred to wait for your decision. See discussion: https://lore.kernel.org/lkml/3aadda40-c973-4703-8ed8-9cf2d3eb70a0@quicinc.com/ I see your favor now and will post V3 based on that.