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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08512C433F5 for ; Thu, 14 Oct 2021 09:30:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8226361163 for ; Thu, 14 Oct 2021 09:30:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8226361163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id ABBD76B006C; Thu, 14 Oct 2021 05:30:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6B196B0071; Thu, 14 Oct 2021 05:30:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 932F86B0072; Thu, 14 Oct 2021 05:30:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 838736B006C for ; Thu, 14 Oct 2021 05:30:40 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 41D758249980 for ; Thu, 14 Oct 2021 09:30:40 +0000 (UTC) X-FDA: 78694523040.31.77B904E Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf17.hostedemail.com (Postfix) with ESMTP id BCBB3F000136 for ; Thu, 14 Oct 2021 09:30:39 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19E6wxhQ022172; Thu, 14 Oct 2021 05:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=O9B8ObB70ZmgYUSOANMuv4I8GZXdCGgkIXGyFNFATqM=; b=HvIG/3MdQXf+OmDaiuPlHlp77VFR0OL/y1ND7A+q5mffPE76hwguUsOGJFgKaESt7Bf6 KOEwgwYszdnRXP+6fHg4ufgvYSSZywOQmF1FSOovXM+5j4wi3eRdjckvnnWwR6N1YrM3 PxTstNHHdewVzz7bMz/TDwFiHejZ5532wzJT4dAoaiKQduapne1LxLtq1dABCl0Omtk4 gmlIJf9SVTv+G3oi1lDGCkjXGus2LH/saJItDlJmZBE16LoZ76K5G11/2Crr80skkN6l Bt6bp6PjZjpebY/t9nwgGs0rgVvDnYB6NjeyOre0X5NHMXawHee/w63QxN/amU4Z6Y/R PA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bns3g1ng2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Oct 2021 05:30:34 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19E8dcM0011804; Thu, 14 Oct 2021 05:30:34 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bns3g1nfr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Oct 2021 05:30:34 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19E9Df0b015894; Thu, 14 Oct 2021 09:30:33 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma02dal.us.ibm.com with ESMTP id 3bnm2edwgt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Oct 2021 09:30:33 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19E9UVwY44499266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Oct 2021 09:30:32 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAEDF112063; Thu, 14 Oct 2021 09:30:31 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39BDE112074; Thu, 14 Oct 2021 09:30:26 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.43.85.209]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 14 Oct 2021 09:30:25 +0000 (GMT) X-Mailer: emacs 28.0.50 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Michal Hocko Cc: Andi Kleen , linux-mm@kvack.org, akpm@linux-foundation.org, Ben Widawsky , Dave Hansen , Feng Tang , Andrea Arcangeli , Mel Gorman , Mike Kravetz , Randy Dunlap , Vlastimil Babka , Dan Williams , Huang Ying Subject: Re: [RFC PATCH] mm/mempolicy: add MPOL_PREFERRED_STRICT memory policy In-Reply-To: References: <20211013094539.962357-1-aneesh.kumar@linux.ibm.com> <83483424-e617-51c4-d55c-6106e66e2659@linux.intel.com> Date: Thu, 14 Oct 2021 15:00:22 +0530 Message-ID: <87pms8ymvl.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: U2116LWQhm14fBKM3lLDVT3YGJHpt0sR X-Proofpoint-ORIG-GUID: xxRTZ3Wp8qtgweptPw3NoO2aLpPJxaOG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-14_02,2021-10-14_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110140056 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: BCBB3F000136 X-Stat-Signature: 7hro14e7iro3gfkc3eyb7affast4e8r9 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b="HvIG/3Md"; spf=pass (imf17.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-HE-Tag: 1634203839-520088 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: Michal Hocko writes: > On Wed 13-10-21 18:53:55, Aneesh Kumar K.V wrote: >> On 10/13/21 18:46, Andi Kleen wrote: >> > >> > > The difference with MPOL_BIND is the ability to specify a preferred node >> > > which is the first node in the nodemask argument passed. >> > >> > That's always the one with the lowest number. Isn't that quite limiting >> > in practice? >> > >> > It seems if you really want to do that you would need another argument. >> > >> Yes. But that would make it a new syscall. Should we do that? > > Yes, I do not see any reasonable to cram this into the existing syscall. > I am not yet sure what the syscall should look like though. I can see > two usecases, one of the is a very specific node allocation fallback > order requirement and another one is preferrence for a cpu less node > over other nodes. Both are slightly different. How about SYSCALL_DEFINE5(preferred_mbind, unsigned long, start, unsigned long, len, unsigned long, preferred_node, const unsigned long __user *, nmask, unsigned long, maxnode) { return kernel_mbind(start, len, MPOL_PREFERRED_STRICT, preferred_node, nmask, maxnode, 0); }