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 1E4D1C4829A for ; Tue, 13 Feb 2024 09:10:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F3046B007D; Tue, 13 Feb 2024 04:10:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A2A36B0080; Tue, 13 Feb 2024 04:10:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46A566B0081; Tue, 13 Feb 2024 04:10:21 -0500 (EST) 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 3463C6B007D for ; Tue, 13 Feb 2024 04:10:21 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D78571A0B3C for ; Tue, 13 Feb 2024 09:10:20 +0000 (UTC) X-FDA: 81786209400.28.A457B9C Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf20.hostedemail.com (Postfix) with ESMTP id 81B6B1C001F for ; Tue, 13 Feb 2024 09:10:18 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="k3 WNDCi"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf20.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707815418; 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=50qwoBL1qZUcAT1DGTn4Ldk2t5cnvbQ47VWB0Xov2Ag=; b=vLNnoJU57TvRaavJhZk1r2Ja4SJhmlkX/q7TFGvWDoF1J5e8bkchSm7xKqTnpxPRU6Vev1 Fi9Kp34bcOexcO3sv6ClIbWgJEzz3tCs7fODvSukKTOvIyoWfadw7185kTRG7KDegVZyCE 3l/K4MKc4psqh1D1Vsd6SiMjZL+cqDo= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="k3 WNDCi"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf20.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707815418; a=rsa-sha256; cv=none; b=SVB8vkV9pRXTm1WQzT0reNy2gnQFC1GUiMURseeq6RcRPpK2OkSYrPbWnd7o5Z5Ky0ssTF fVdK9/Vsjw3v4tud4uDSWfv0upYxBjG4mPCDtJ1x42fp9eWJNIj3b+hTB0wxBfF7h1YY/b OIbmfEg2czuWnw3rmCojLSWqVMd0TQA= Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41D90DcC024107; Tue, 13 Feb 2024 09:10:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=50qwoBL1qZUcAT1DGTn4Ldk2t5cnvbQ47VWB0Xov2Ag=; b=k3 WNDCipSlVk/SSLwh7LmBCCTV2oUzK9QxNxIWKdrUiFlvvmIsVDIKBfunERblcIFH faaQi4JQvEIrFOTL3ukgpwrG8CDGM5BQfWc7IxFvn5X+0GwiSfb0f/+vZRJ1vLNy 4shQMdWQfohXjM+rPJ93KFATaAHZtLnR0R2ZutF2Uk3vbSzu7qVRMHCwLBqz6oxj DvBuyVRihkheHh09mg19JzUvKfvlPw4+M2qARymF8Wen7LQ9V4KyvcoZxZTWVyut mkL1RyZA0SzpaCo+bn1hKAi/9xZZgrAFEzqSbZaRZdJLVKj+v32KHGbgb0f7lXp9 xlbInF9TecfIv2CRq1IA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w7gse2hgt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 09:10:09 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41D9A8Ea032524 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 09:10:08 GMT Received: from [10.214.66.164] (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.1118.40; Tue, 13 Feb 2024 01:10:05 -0800 Message-ID: <50d61d66-e17c-55b9-23f4-ceea93e81e68@quicinc.com> Date: Tue, 13 Feb 2024 14:40:02 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] mm/huge_memory: fix swap entry values of tail pages of THP To: Matthew Wilcox CC: , , , , , , , , # see patch description References: <1707814102-22682-1-git-send-email-quic_charante@quicinc.com> Content-Language: en-US From: Charan Teja Kalla In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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: bYcMl3QYj68A3s_ZMeMrEvrIklLd6DO1 X-Proofpoint-ORIG-GUID: bYcMl3QYj68A3s_ZMeMrEvrIklLd6DO1 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-02-13_04,2024-02-12_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 adultscore=0 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402130071 X-Rspamd-Queue-Id: 81B6B1C001F X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 5ksxjdtw9sjiex4jcccfhipd1jpjy1d5 X-HE-Tag: 1707815418-802392 X-HE-Meta: U2FsdGVkX18C1cce/qrG5AhYygK0bEvFuby5OBDvtBuVsbAjbg6FK89w9iztW7JV8e+Tka2mWOcvsKQzMVu9YBrVps46x5Vium+Ds3JCi0E4pHdpfDIiLH/BOa1T2zZaKY8d3e9zkC8RK8UBnezshNwmxDPOF+5suN4LrXYxyeqCtwbSyXBlu82mxz1XNvkfq/JrdK+Z/d5tAGP+Zn9hSlv2RntIqRHAiWqMAu3c9Kuz4PSyLSweYBLHq+YkTYAxwwxSN7dgonuB7IycgZZKWkCVrovTSV3gLySiivUD0U4ai02JRF7Tru4jokIxiuwd7uDQNRlR/+gfW9Zf3sNKPq/XpnNVxUAVPqeLvsXdVeSe/lfaKbuQfdeNULM+sE04iSF/9pDgknpa2ijy4ljJZxMQEpZRQrdKGKt2L47g6dSpONaTR3zatUv9uquJFpBLgbP1GY4x+2h8J1T0ncI3NQ5SVT9zANiQdEDAQqogY5CtJ7esEW2hSs/LekfGYwtcdat8qh8oXdH6cZfMJXP/X2dddM4mz4/mx/rbTGuterjLeIg0qect8T5ItHNWxfdhr0hv9t1YaWxjy2p0MChune2I3MvPofDpE0/HZTCI6eEzCz5+WzyuH0E3/GRCkRFOtR4Js/qLGw49GQeIEgxKFsnP8NubWR2eInVD/HSfT65eBcHvXTH94LjCsXS5vaH5yvB/0UxF3mcfHbriiRzaS7VteYyK0iXLPkVm0H0VM1T91/6XUgv+Dcq2ICCS0FVCbu9vfNgOPwYBLEZppNv86pUg1uwRlbbJJZpUcJRl0LLEDEn9UpDKZsLRNmkoKKoWauj5LnjjKXtZBnSa7crAUQBu81iD75s6zly85mrnSt4dC8ahsB1BNRJ/Q+WN4Zrkc9NE/AN/cpUiTbP7DDMBj6PeigSDEcdxITFTyPS53223ihSQjoSqCLpu/cYh4tJHwabZAVMNI73FekjeVSX 7SyP+WMU Y7OpBHsoS4tWAZHei/+D2jQNfeK0GwDikoXzS7RNt3gZ7jkSJGnCC2LgijtxKksE4beo1BZnOgM626fAwVKyPGDdDnE9KDYi2tCQ2ztaEuL1p/1+OA2Hqq9VobaHslND6RtvMy+xC6bd/2+RWNy+sDIFYjhDmJlUgSC50wMvpI37RBu86F+wH8dFB+8xj44++ikw/q14cJ/GtTMxeAskYjK1C+X3QgBMlRQQg7z/JfqnlfpNqVVv05Sv+gcuuG1qZkX57rBMmbcWaZ9LzkAHCKu9rwpJ0ipFYbXiZ+I+A+aN0nnt9KQIciqrn7tz6XU4uAhz4NjIIDg7/1evoE3dESAI2KRnqcFxAUsakZGt0xblzSjXwI3sPRbUvHA== 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: Thanks Matthew!! On 2/13/2024 2:24 PM, Matthew Wilcox wrote: > I am deeply confused by this commit message. > > Are you saying there is a problem in current HEAD which this fixes, or > are you saying that this problem has already been fixed, and this patch > is for older kernels? Sorry, I meant this patch is __only for older kernels__. We are seeing this issue on 6.1 LTS kernel. At least I am not expecting this issue on the HEAD of the linux-next branch. Seems the below message is not clear from my side to say that: a) why this issue won't be seen on the latest kernel and b) the problems associated with the respective patches in back porting to LTS branch? "On the recent kernels, this issues is indirectly getting fixed with the series[1], to be specific[2]. When tried to back port this series, it is observed many merge conflicts and also seems dependent on many other changes. As backporting to LTS branches is not a trivial one, the similar change from [2] is picked as a fix. [1] https://lore.kernel.org/all/20230821160849.531668-1-david@redhat.com/ [2] https://lore.kernel.org/all/20230821160849.531668-5-david@redhat.com/" IOW, the below couple of line is ensuring the proper swap entry is stored in the tail pages which is somehow missed on the older kernels. static void __split_huge_page_tail(struct folio *folio, int tail, struct lruvec *lruvec, struct list_head *list) { ............. + if (folio_test_swapcache(folio)) + new_folio->swap.val = folio->swap.val + tail; ............. } Thanks.