Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1087261rdb; Mon, 19 Feb 2024 04:03:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVud4MPXz5GyuW3zffyD4yTH6JhY0FYR8q0k25slvsr+n5XMyrjVQFx+XOEer/EOUXrz9ko8Sxl2sGXf5rMbVAjo3rr7/Bjh88RfhVY1Q== X-Google-Smtp-Source: AGHT+IFJZa3sE6YGeAl2b5gA0ZPkHjIZwMprFX8vlpFkBT0FYa8ZXA06YHwP6nKAgtdOu+LbdPD8 X-Received: by 2002:a05:6358:759d:b0:17a:ec86:d3dc with SMTP id x29-20020a056358759d00b0017aec86d3dcmr8911950rwf.1.1708344228271; Mon, 19 Feb 2024 04:03:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708344228; cv=pass; d=google.com; s=arc-20160816; b=kLEh1EePBeQoFlFCeJg4LpDpdRLuQtDF7nrIVNPMZULbbq6HPPTTQTxnhN0WXHtwzz vyZR0Xjdaase/CwQvm9f/UOiMLa9vKLzviw2XVrRaK/PBR/qXIMsRhkPiIfQHHLm5QT9 so/Wfgfh3qqP3H11FhSonWlFcrwkxZe69f0W7dASxP++0JQ+1yKe02yPnKG/Mzti/+Rd jDEuwDtGpnLue6ksrR9+tKZr9QScJH7IwJU4rTOMkOTR9r8vP1zniWGjnefLSe/Jp33w DLdWXLSjEDy2mymQ4BJlqj4PxqCElgniuy4D0rqZo/nLbgPwfGwrmXyh8TfqrmTd33fh prhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=tQ67GULT9b2cq8o8yDuQQdBKS5DXm9sCybmVYMJMEs8=; fh=WkakfSRTR4mKy4g+2gNjJXvrEmYyI4aAcFIPyh+q7VA=; b=oc6sOnF61iGOEZX2sxSeHx6+flhDVOv8l9tvz3MzDID7btm5LH3+yqFlU7xbiJdhF7 I9z7G0quMLOfIVYH1A0U3MC7tY/p7DjPzsrSoTnP6F9aJAgxVcKqyoBO9J5L9/XW/HTD aXplwvAmMSfT3X3hewljxyF7uRSTmvO0r5lCFS1CAMFB/iDUfRsXKZ+PqH2D5K8Bh8BC GbQegzZG/0LfFiIhJdDknOUf9v/itbfccrC4iXj1Zp0iv46arQ215mIEwBklfgcWjdff hepv8Bb9A4pztU3itmWYGJsCPmkXqWwv5uffQqe7DuFk39HhaEGnULRVoo/bbnaktvGR 0i+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=To78uyru; dkim=pass header.i=@suse.com header.s=susede1 header.b=A1NLMhrb; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-71274-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71274-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 d9-20020a05622a05c900b0042c513c8cc8si6343784qtb.68.2024.02.19.04.03.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:03:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71274-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=@suse.com header.s=susede1 header.b=To78uyru; dkim=pass header.i=@suse.com header.s=susede1 header.b=A1NLMhrb; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-71274-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71274-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 47C731C233AA for ; Mon, 19 Feb 2024 12:02:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A95812D602; Mon, 19 Feb 2024 12:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="To78uyru"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="A1NLMhrb" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 164382D045 for ; Mon, 19 Feb 2024 12:02:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344134; cv=none; b=UPq9m8fG5RQnIQCrlYPGMpP751mB7ISqHuiEMJipREjcXhuDQP2DGn+qBizFf11XCqZUU3ALIj39uZT3E9oNtD01RCuwN1e3OYKTS1AdczjuIBS/h0elv/p/ZuXPpPTVeQobm6IEUO8hL3hQ+j+ASGOLurNlVpW9W9xZXOKmubo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344134; c=relaxed/simple; bh=Bb6kPvv5oK092ISD8O2j3930bKBc8I2L5B8ZYVbUHDA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D8ND7WIalMqlN7b8Q4YH6sWqwovtneb+l5hIzIrtcIXZBj99kOTSxZ5nL0huCKkTvOeb2E2FUT0Vu0kMUrWAoFcwYflhpROBQS5+r6FOxotiMP0eUqNuQALoRLniNHeSSPZtbKk4SXb3maleUT7aVWZtfNjLK4D11VET4jEHhGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=To78uyru; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=A1NLMhrb; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3B7FB222F6; Mon, 19 Feb 2024 12:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708344131; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tQ67GULT9b2cq8o8yDuQQdBKS5DXm9sCybmVYMJMEs8=; b=To78uyrujPNe5UELxtzj2tigRKklvQJMo5Bv7bYjY6EM2HIKrbTpY0wcePEEYrEXoPuHrd IL8uqPD9sqMNi4Yt6UZhhEHBfb86stjJewTsS8cgZO+IGe8bAy4P7UzSVieM3EsM4HwdDo 7OHSpE7LsHeA5ik/pEQaRYy3j3QvpEY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708344130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tQ67GULT9b2cq8o8yDuQQdBKS5DXm9sCybmVYMJMEs8=; b=A1NLMhrb/o9+kAV69g5AXZVzzWIWvKlqCyj0Cb5nrQN8F1oLnbcBGvRZO0W3lL8ceMuiHH bMd2WSW19aOStA57+gs+lCfrH3Wv4OtMk8ZoI0Fs21SCtvaupNgvsHe5ED+9t6RfjToDeb ls2EMCTxMaQpPgDU958wMOiHLnFeTWU= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0D25E139D0; Mon, 19 Feb 2024 12:02:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XM7hAEJD02UfPAAAD6G6ig (envelope-from ); Mon, 19 Feb 2024 12:02:10 +0000 Date: Mon, 19 Feb 2024 13:02:09 +0100 From: Michal Hocko To: Donet Tom 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 Subject: Re: [PATCH 2/3] mm/mempolicy: Avoid the fallthrough with MPOLD_BIND in mpol_misplaced. Message-ID: 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Level: Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=A1NLMhrb X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-2.52 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; DKIM_TRACE(0.00)[suse.com:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWELVE(0.00)[22]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.51)[91.79%] X-Spam-Score: -2.52 X-Rspamd-Queue-Id: 3B7FB222F6 X-Spam-Flag: NO 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. > > 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 -- Michal Hocko SUSE Labs