From patchwork Thu Dec 2 12:38:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 12652549 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED8EBC433EF for ; Thu, 2 Dec 2021 12:38:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 749E06B0074; Thu, 2 Dec 2021 07:38:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F8A66B0075; Thu, 2 Dec 2021 07:38:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C0D96B007B; Thu, 2 Dec 2021 07:38:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 4F54A6B0074 for ; Thu, 2 Dec 2021 07:38:30 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0DAE989D25 for ; Thu, 2 Dec 2021 12:38:20 +0000 (UTC) X-FDA: 78872807160.20.6CFD0C9 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf06.hostedemail.com (Postfix) with ESMTP id 77E82801A8B2 for ; Thu, 2 Dec 2021 12:38:19 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B2ArbXm012880; Thu, 2 Dec 2021 12:38:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=Kp5WdP4AL8k8yTQ8NwBgFldrtvRtA2DX8bLzeiwUY9A=; b=E359KiagZW/qqoxiApwdkWaiKX7/BWOhSZ/a4iDK9KfoTSXhXf9XhW71+NCXfKtDT5Ug 4NxjEE8LEcVbQ/9BKsRr5G6lfKU9GUNg6IcElkVLEgApyyecJxnkD43DP1S5h//65bo+ k0ncG3+LBds7DULLHvUpNethxY3aksxI9FyEHW2qwKlguRBQ+CIJBSkgqHQnWA+1+ELR INRwsQQR8e+c3X6zNJa5KgB5E0LPGHWVa/OkqPyt8sNMMTZNeGnVBy6TZJ3pTnCcJwop /wC2pM+9z3AL1Ib7fXzXhkhI71LvYfgCyn16yFnY/xgXxKz1ULEBvfnEeHIEXpBL9jqV cw== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cpvssa2p1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Dec 2021 12:38:17 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1B2CWov1028764; Thu, 2 Dec 2021 12:38:17 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma01dal.us.ibm.com with ESMTP id 3ckcadfp2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Dec 2021 12:38:16 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1B2CcEvN31392192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Dec 2021 12:38:14 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A22686E050; Thu, 2 Dec 2021 12:38:14 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCA636E056; Thu, 2 Dec 2021 12:38:12 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.77.159]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 2 Dec 2021 12:38:12 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, daniel.m.jordan@oracle.com, "Aneesh Kumar K.V" Subject: [PATCH v6 0/3] mm: add new syscall set_mempolicy_home_node Date: Thu, 2 Dec 2021 18:08:07 +0530 Message-Id: <20211202123810.267175-1-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: v5J-c3E6tJ16f-P3djfOD-9qNPoLrYdf X-Proofpoint-ORIG-GUID: v5J-c3E6tJ16f-P3djfOD-9qNPoLrYdf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-12-02_07,2021-12-02_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 spamscore=0 mlxlogscore=893 mlxscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112020080 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 77E82801A8B2 X-Stat-Signature: 8d8r9e79kz4whkhhq74i8uqrcnaxyaa4 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=E359Kiag; spf=pass (imf06.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-HE-Tag: 1638448699-442731 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: Changes from v5: * Add missing mpol_put() * use untagged_addr * return error for memory policy other than MPOL_BIND and MPOL_PREFERRED_MANY * update documentation/commit message/code comments Changes from v4: * Add flags == 0 check * Make sure the home node is online before updating memory policy. Changes from v3: * Fix build warning reported by kernel test robot Changes from RFC v2: * Rebase to latest kernel * Update numa_memory_policy.rst Aneesh Kumar K.V (3): mm/mempolicy: use policy_node helper with MPOL_PREFERRED_MANY mm/mempolicy: add set_mempolicy_home_node syscall mm/mempolicy: wire up syscall set_mempolicy_home_node .../admin-guide/mm/numa_memory_policy.rst | 16 +++- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/linux/mempolicy.h | 1 + include/linux/syscalls.h | 3 + include/uapi/asm-generic/unistd.h | 5 +- kernel/sys_ni.c | 1 + mm/mempolicy.c | 84 ++++++++++++++++++- 24 files changed, 125 insertions(+), 5 deletions(-)