Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2927659rdb; Tue, 13 Feb 2024 01:10:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX2uy1S7a4Z7lJXLt6cHNs+B/4igJMM8PjiT0qe1G3adqlx4OOsyJm1ZuR6mlcPVbx1i9DxUepdErRnc2nqiNlLPvCZT/yt6VW2MONe/Q== X-Google-Smtp-Source: AGHT+IF7zt4TkMDvp23WfEdS18Zu0J908ndGlijEccMb2wdHqW54827y7nURwo8e8vPNG08Zv5j6 X-Received: by 2002:a17:902:e547:b0:1da:3278:e6b with SMTP id n7-20020a170902e54700b001da32780e6bmr3947613plf.66.1707815436835; Tue, 13 Feb 2024 01:10:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707815436; cv=pass; d=google.com; s=arc-20160816; b=r9F9b5dBRBXoIKiyI6kMXfeBFv4r3F09Uz9//IyR3HtEAQYPbifGSwXF4Oxok3Xk0V PRJYhEKsbfBYhLLjK4seQJ5KwNDGOKI377LDkYcNECWIgtQPKSHSt8/E7+rkA/u/nyyd SwdxyfYeEtYVh51vqO7eg+RKHrRJvizf3penyMPxRtpW+Dajq0OKX51n6s5cx3clGTGm IYwBgBFh4Yu9FtKrjCzVU4Ccc/SqFe94YJNl5rUUyI+Jy0yIUrzD86TKmGFri3DaE7hK rep6i7U3nwtGeDwtvHD65Oe74Qaq5y51gP+G+JsGT4JE8HUDUhcy/HBpHKJsn+uDRCpe u5Gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=50qwoBL1qZUcAT1DGTn4Ldk2t5cnvbQ47VWB0Xov2Ag=; fh=U2scP6sDVlCOwddVazY4/S81WBety9KSLFPCsh0ciGg=; b=gXFRTnjsqDB5DxMjyTVdigA+Pncx6k/6OYXczjmIUir/IX71b9BWhAaZYMrYbApL4D ArIT3+uxx6olmJTRx3APBmjF00yPcKKMu4dcIRR03Dd4zfWXIHG2fZ+XzgCgurAD1SPH crG2s40HJASBZV5zSZS546+Lcc4VmEe3iueOnN4Nkfot2IbQcxAkhj9t+gF32Kwhw6Iw 8U9lVypABJfkNLxcdeN2QX3D6IK3lFv5vlmx6fQphbNa3y80yp37T5PqwMkMNLezJ+L5 zmP48ldilnhH/MStHA8W32hNFk6qYv8V040rBSTlHxWunRlQ9LIfwI/T5KmoVrDIYtL6 lgEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k3WNDCip; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-63180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=2; AJvYcCVIAd3LGXYiFUxGs/ZujB1Q8XMtpFYitcQaI/yukkcHibGlrX1uhgoY6xnpDw29M6ZoZO42NlSVYTYRWvcKJiTQiFVsRYxM9PUklc3BTA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h4-20020a170902748400b001d9efc71c51si1709410pll.99.2024.02.13.01.10.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 01:10:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k3WNDCip; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-63180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 828E2281ADE for ; Tue, 13 Feb 2024 09:10:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2C8221104; Tue, 13 Feb 2024 09:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="k3WNDCip" 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 5D8E91B273; Tue, 13 Feb 2024 09:10:27 +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=1707815429; cv=none; b=WxxLRrIWWJJcbr8AK4z8O1lkAdpiZLp51FDCN7SV/ltoR6bHxkog1r4l1VhlGXqimps33XMEUCMANcEzks04kwVLBF3TgkBfSvP5MgQO+hQ7PA0/2yxl9onICYlF2FtAp+yNMryt2UpBTRpPj1wHXFluDcHnBt85oPCICBk18L8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707815429; c=relaxed/simple; bh=R8R7lZbqyir1X5V99j2RDN+30uNU2eW0kHTHyCiLY44=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=k/ARKlWbDacaI27n8JayyUCNOBBW5aFbaibd2tbn9VY18gw+Uf6NPkDyv1zcAfVlLOforXNWVRFq+tS0IwIZt2LiFXVvoN0hh6IIyLUbC/0up8hldSv9bMOKrzyZIR/803xEq1bBJrRhsENJNN+wC7B4Yx7ZU8jbFehFTa2Ekz0= 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=k3WNDCip; 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 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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-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 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.