Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1198172rdb; Mon, 19 Feb 2024 07:19:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXtNLsKzywVaWXcFy6ugjPGloIdfL1UUik/76tUFo813NxCVeKHHfej07A81vyX24EmcvnSR+ydrfUuK2LJvUg5yDPJWDXfABLAc0iNtg== X-Google-Smtp-Source: AGHT+IFOxaLOJRQ/ULm0ENQj6ihORs/C8kxMp8vI06nK+C6TXcWBOoDX2ZFnQbjxjlwRAoi8AqxY X-Received: by 2002:a67:e2d6:0:b0:470:5d0a:6b29 with SMTP id i22-20020a67e2d6000000b004705d0a6b29mr1698090vsm.5.1708355975648; Mon, 19 Feb 2024 07:19:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708355975; cv=pass; d=google.com; s=arc-20160816; b=xmW67SqaaWYY/tvYMrDvEC0K3r+KDnwpX+cKX/s7iFhu3mGxSVb1p9RBg5YcPUBcUs QnXFBqOlzozRWdlCZNCHrZGIArkC86QTLo1B13zohfFcZFfQt6MjZJ1pWhv7ozapThCb Jt/ap9fboCtk06GxJyyLBXzvqwy2PALpDOuJb1eH+DpZvonr0ROPOU3MLBsLh1uHa9zg 454h0b7Gfl64uEsqPP+f91VYtKGcz8SdH8gO+LMDt2S5FFFwaRkST8uxenlQkt5hn0Y2 c2JOYJLAjInZ6nIcoPQdMYQkT0mkv2NE1/jbovG/VuH8uCwf3TUMR21kxgEOtyACU+e4 4zHw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=yVGjdmY5iAHugXQNWJ8/Fw9WYRlDYQRwbAMRx27rxPM=; fh=t0V8zzIvNBXody0+2TZEoC3WeHFvUS+SrXkhIUDYhhs=; b=s3deu1wpeb5YJK6o6lLOj9h4+ExUTQGzL13w1dH0TnophM8i7K9x+RbBMTHdhN86ot NPrRmlmgY7nrJZdYWeu7hy/goOg2hM+1pk2tW2qIprjutQ30DsVv+RCOgmFwHFs9AWbU gjE4PG+HRnqRJp5jyhkovrWQroofzuZCTeRsqH9fwL4gaQzvtNeRWE2IDPaJjDs1ljbD zp7V+GwXmsMKtA4gZRD66haAwIpSEMu1fYpyMSgOeDV7iwop/NcsZ1Cqa9N9bwQ4/r6y 6zYvJ2jcG/8nHTK5I1XHGmuIK//3cL0N+P8bo5fEt4m4JR/JC7eXsWbdo8AsyBN9Sagz T2jQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LFCePNxG; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-71575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ij6-20020a0561025e8600b00467652e3237si891444vsb.393.2024.02.19.07.19.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 07:19:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=LFCePNxG; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-71575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 441381C22827 for ; Mon, 19 Feb 2024 15:19:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D353D39FC5; Mon, 19 Feb 2024 15:19:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="LFCePNxG" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 A92B539AC6 for ; Mon, 19 Feb 2024 15:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708355968; cv=none; b=bTeq+17ezkAW5h7dMSVUHcQEa0Y3E0pP9Q3208Pz1PlH/lB2XKB7wykA/fHSKRiwxmMcGYbcwXhrnmmOLFOdAMZ8HVYp30GEncnuZ41Extlg/bQkObSu5etPMgi+drmGGvc1YjlahVNZoCSs50Uxz2VYTaHWVAl1crtu9lpuwLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708355968; c=relaxed/simple; bh=2ftRL6ak6vNWy26XU5huffGC5jlMFBcle07fPPhlgMc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rzs7pFYiPWFCQWr/woC7Qm/hmA2KToyYHsnv5OuDBpgrEVfCwO80LukdPavTCmWGZoOzBODUNDP4Ay7gL+IjMqLHe/33T6xdzTr6zlFBCtItE8d9cptNtu3pjcyxa3woWi37bARysVESfzFVIxs8grQe//J8vgotpWkhltvL5ls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=LFCePNxG; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41JF0tbI026387; Mon, 19 Feb 2024 15:18:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=yVGjdmY5iAHugXQNWJ8/Fw9WYRlDYQRwbAMRx27rxPM=; b=LFCePNxGdnySouVA2yXL6+Qi29ZtkUS0RrO4zeIIXkC5MKTbZfm3D3/y99NCVTJ3w0tS a37pdUHXfxHvlO3DwsLcUuHUinFkATgQ4PpASTzDUNJVCYKw+XYjSHDkWaWgGSKq6m/C XoxVAMiakJQEkWGndQnoDd2DzdrTxfRvCzOOC7X7BojSJdAqupCGynyYvQpk4fsmM7To V+AAijx5SCNKa9wv/PLm0TYtmNlMkZT2xupyasxf9fkRQ7lxkgfFzSoYTuPL7CxRWdCX BKNHF454FR8E7NXmsrli1LPvQJsBqQpBTRyyPU7+WsOLL+GscJ0oy9bce53DoU5FXYfa gA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wc81bb45x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 15:18:49 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41JF13sD027418; Mon, 19 Feb 2024 15:18:49 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wc81bb44f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 15:18:48 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41JDGDt5014406; Mon, 19 Feb 2024 15:18:47 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3wb9u29dws-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 15:18:47 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41JFIibA16450056 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Feb 2024 15:18:47 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD66558067; Mon, 19 Feb 2024 15:18:44 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28C1858052; Mon, 19 Feb 2024 15:18:36 +0000 (GMT) Received: from [9.109.245.191] (unknown [9.109.245.191]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 19 Feb 2024 15:18:33 +0000 (GMT) Message-ID: <3a64efcc-9a9d-4973-92f8-d76899f01868@linux.ibm.com> Date: Mon, 19 Feb 2024 20:48:31 +0530 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 2/3] mm/mempolicy: Avoid the fallthrough with MPOLD_BIND in mpol_misplaced. Content-Language: en-US To: Michal Hocko Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Aneesh Kumar , Huang Ying , Dave Hansen , Mel Gorman , Ben Widawsky , Feng Tang , Andrea Arcangeli , Peter Zijlstra , Ingo Molnar , Rik van Riel , Johannes Weiner , Matthew Wilcox , Mike Kravetz , Vlastimil Babka , Dan Williams , Hugh Dickins , Kefeng Wang , Suren Baghdasaryan References: <9c3f7b743477560d1c5b12b8c111a584a2cc92ee.1708097962.git.donettom@linux.ibm.com> From: Donet Tom In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: U-OLzk4O98MX92nF8yp1-quPYt5Up4G6 X-Proofpoint-GUID: NJ0Rt-lau9wYBECklNCSjEcuji-DF5vn 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-19_11,2024-02-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 phishscore=0 adultscore=0 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402190114 On 2/19/24 17:32, Michal Hocko wrote: > On Sat 17-02-24 01:31:34, Donet Tom wrote: >> We will update MPOL_PREFERRED_MANY in the follow up patch. This change >> is required for that. > Why is it a separate patch then? Does it make review of the next patch > easier? If so make it explicit in the changelog. Hi Michal In this patch there is no functional changes. This is just re-arrangement of code. Patch 3 is the actual fix .It will not look nice if we mix these patches. As you said it is easy for reviewing also. That's why we kept it as a separate patch. Thanks Donet Tom > >> Signed-off-by: Aneesh Kumar K.V (IBM) >> Signed-off-by: Donet Tom >> --- >> mm/mempolicy.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/mm/mempolicy.c b/mm/mempolicy.c >> index 8478574c000c..73d698e21dae 100644 >> --- a/mm/mempolicy.c >> +++ b/mm/mempolicy.c >> @@ -2515,7 +2515,15 @@ int mpol_misplaced(struct folio *folio, struct vm_area_struct *vma, >> break; >> goto out; >> } >> - fallthrough; >> + >> + if (node_isset(curnid, pol->nodes)) >> + goto out; >> + z = first_zones_zonelist( >> + node_zonelist(thisnid, GFP_HIGHUSER), >> + gfp_zone(GFP_HIGHUSER), >> + &pol->nodes); >> + polnid = zone_to_nid(z->zone); >> + break; >> >> case MPOL_PREFERRED_MANY: >> /* >> -- >> 2.39.3