Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp93521rdb; Fri, 16 Feb 2024 23:33:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/mL2R2ryiIFxUFrYB0z05TkRzMQGz44bAP9Ju6DlzsEXyprwtI8ozjV6cuzPj3OvPDfou/QH30FU1s0M3Dn7zNZ1XNXSnUfmFoB60Kg== X-Google-Smtp-Source: AGHT+IGqtnh+Kno2qcp7v5WoCo2A7k1SGpBWaUdj/WrCXqTsxftOknwX2MRgbUPjXm4zHVNYWV3Z X-Received: by 2002:a05:622a:27c5:b0:42d:d095:ea55 with SMTP id gx5-20020a05622a27c500b0042dd095ea55mr5520749qtb.13.1708155182316; Fri, 16 Feb 2024 23:33:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708155182; cv=pass; d=google.com; s=arc-20160816; b=K6SVrW9+xgcm/xd2txcoNmgaPQYsKUTX6v3R8tYSAaC6D4Mxa2MLnYKFm72e+4IDEV qDp8HB9krWcanHhwrTn/mBQrnLBvKMSuVm7f4BFHhk9fygcn/cS+932S+8tKOFcgX8Q6 ukdDXbRZzUE/1dJodom9Z/o72lRaDuVoV6Cu4nVmrRf/64mTa45fg6bZSb2+IupPRmVO SJSOi+Ey0AjEc6g11FBxhCaTqS7XWn4R9xVvwyi2NEm83f6ZwOOSCPa3zZ3psYfQQu/X nzl43c5xjsXakQNigh59XOxxUBQRxtkS5B6GOB4mle2GgtrtTFtfs3Z4t1fWwxWcYoZp 0jWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qNdnXOL/mCGBemUkNo77c+l0ZD3S/yNBwt3aziQTX6E=; fh=FFcNRKX/cmmdEO/4OCJX4rYOGTYmFqpwDil6Wds3ioM=; b=TZZjj/McJkygcS96tDXmidx4R6Nq9xTxwOrEXDmvroQKLTkYSpybsqoeApy+3sAg9x RKuSuTzxSK0F6eUTw43I2ZMCybjTH6E45P5Os9nK1uGU0fPAzdzEhTe9iFIiX2zGZ4Bn VE1TA6Ww3u1yx8eTptL7MbV/KJ7WhRVROz7ZL7YPiRdy9FybFaI1jmzlkNXg682BRX0Z HvB2jTZaG0otzegUruyiNBR66LQad/zx9CTuuvEgoMcguc0ZqB8UVaamLvOCRt/L1alx bZ9eqyRBRs2nk/fUkKmZdCPkY8HP62htt/A3oBX1lYaxBdSIuM+1GQknNkn0ksQNV3lh 6pQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WbfT29f8; 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-69717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69717-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. [147.75.199.223]) by mx.google.com with ESMTPS id a14-20020ac85b8e000000b0042c3842ff57si1779910qta.495.2024.02.16.23.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 23:33:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WbfT29f8; 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-69717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69717-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 1593C1C20F56 for ; Sat, 17 Feb 2024 07:33:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3E011CF98; Sat, 17 Feb 2024 07:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="WbfT29f8" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 72F2D1CD28 for ; Sat, 17 Feb 2024 07:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155161; cv=none; b=nmeqgFBM7yT0vhhKOfoPQZYmROPzjjvKT5XFcxUEsPyEOKBptK34XDmovjTUW7gmhIZhP/1Z5ujuVJnjq20gdGzRunJBwU6nRlHwZMDBO0R4HLa1xts6JvV/sD5bu0THQaWNDv9apUk+33oPLU5RuI7GQu0Jjb8mjLKnPCZ+22o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155161; c=relaxed/simple; bh=PiQwLTmZ6W5HTM2z6PZFxaEnlW+S6lS3/1uTGO6XgjA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CpwSVUS3Pcupkod00SVvDmd9w8kbymYDvWYIwnvmJRe7gFe1lOJmJNJRPn0khGeOrU+SIxpA+F0c8zq1VkduqzIC9sp4RChtMWzQRh6h3bY/SbhNQ7OkpSj5XSS3IO+5zqk9L2dJBNY97CBtmE2tPW9CwSLmBAU4gohBEG452Xs= 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=WbfT29f8; arc=none smtp.client-ip=148.163.158.5 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 (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41H6gu7b011493; Sat, 17 Feb 2024 07:31:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=qNdnXOL/mCGBemUkNo77c+l0ZD3S/yNBwt3aziQTX6E=; b=WbfT29f8MSInX04uIWKE1R4g4T4wDLqm2Q0+GtfRgUg8RRlhTkOlh/pUMOPmEYnenrCR AKZFo3ViieOyFuey9IE2W8C4mC7joVXQbScMGvMJmCj3HsXfFlyCHBw/kvTaAd4MxTwA uvIqoBWM1tjQghekGbfbiLW7zr53YcsfRPKyi5JRcz4CN4Cm2FynNfNGCIN0DoSwi3MS Epq/DXu3E11Mv2gU7ajZva5PcyzkvqrOtp3Kjj4QaA6wSNOyItBBd/hqsLt+mnkTCJYN rXfNcroAyuUE0GW3Da9WtgypR7CpqVZ5jcYIQad59SlxIWAxQTLjaZe4lLvzyvQXGPYX 0g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3waqs30jmj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 17 Feb 2024 07:31:48 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41H7UPCA013204; Sat, 17 Feb 2024 07:31:48 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3waqs30jm7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 17 Feb 2024 07:31:48 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41H55V6k010050; Sat, 17 Feb 2024 07:31:47 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w6npmg88w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 17 Feb 2024 07:31:47 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41H7VhcM18940586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Feb 2024 07:31:45 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F4832004F; Sat, 17 Feb 2024 07:31:43 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1FFD52004B; Sat, 17 Feb 2024 07:31:40 +0000 (GMT) Received: from ltczz402-lp1.aus.stglabs.ibm.com (unknown [9.53.171.174]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Sat, 17 Feb 2024 07:31:39 +0000 (GMT) From: Donet Tom To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Aneesh Kumar , Huang Ying , Dave Hansen , Mel Gorman , Ben Widawsky , Feng Tang , Michal Hocko , 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 Subject: [PATCH 2/3] mm/mempolicy: Avoid the fallthrough with MPOLD_BIND in mpol_misplaced. Date: Sat, 17 Feb 2024 01:31:34 -0600 Message-Id: X-Mailer: git-send-email 2.39.3 In-Reply-To: <9c3f7b743477560d1c5b12b8c111a584a2cc92ee.1708097962.git.donettom@linux.ibm.com> References: <9c3f7b743477560d1c5b12b8c111a584a2cc92ee.1708097962.git.donettom@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: RFIikoKL5ffHBWAyVD9mrafMHgu0IRNd X-Proofpoint-ORIG-GUID: sLIiKqq1v8CAfDTE3aGBn-xbDlUw40Kv 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-17_04,2024-02-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402170058 We will update MPOL_PREFERRED_MANY in the follow up patch. This change is required for that. 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