From patchwork Tue Nov 16 06:42:35 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: 12621569 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 B7D4AC433F5 for ; Tue, 16 Nov 2021 06:42:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50EE3632AA for ; Tue, 16 Nov 2021 06:42:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 50EE3632AA 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 7DEF76B009F; Tue, 16 Nov 2021 01:42:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 78F196B00A0; Tue, 16 Nov 2021 01:42:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 656806B00A5; Tue, 16 Nov 2021 01:42:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id 55D1D6B009F for ; Tue, 16 Nov 2021 01:42:48 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 07EEF181DDC1E for ; Tue, 16 Nov 2021 06:42:48 +0000 (UTC) X-FDA: 78813850416.02.5BEA6D5 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf31.hostedemail.com (Postfix) with ESMTP id 5724F10527B3 for ; Tue, 16 Nov 2021 06:42:29 +0000 (UTC) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AG6IMqL015670; Tue, 16 Nov 2021 06:42:46 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=hULOhBgj2Qct0VstNZiktAtjBH1IaG4v/8qaJKntfeY=; b=tmPn2vHSOcQERApF8o5gmPp70WCFHXN1DHSfAu6HKPUcR/ZCSA1LGDCuxhEo4jtY5WGf HKKd/4NINjwMDkx6wcD/zmmt/XpON3itlFGUrHTirapgL0BqfYQDZLGHatNbj2kHduOD Sz1jKM1L8y/VfKuT8ZSR7n4BlJWjug5CWR/K6bFgu+voxBLwA/O4P1SEluyx5e3dRKFn TdhMqvdNSIGbzSCEGMydwj+NiiWhtWXhA000gQF2OkMdF5qXvmNNiMwnlrtOHtSrqNss R3jfGcuNSm4oxMIgxnIrQigH2mR+baiNi+4fCcqCOxThQv5EN8yDhnnkMfxVesLWfRJe TQ== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cc78srcjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 06:42:45 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AG6ge6f022964; Tue, 16 Nov 2021 06:42:44 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma01wdc.us.ibm.com with ESMTP id 3ca50anuxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 06:42:44 +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 1AG6ghaJ59244924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 06:42:43 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 704A96E05D; Tue, 16 Nov 2021 06:42:43 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F3AA86E056; Tue, 16 Nov 2021 06:42:41 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.124.74]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 06:42:41 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, "Aneesh Kumar K.V" Subject: [PATCH v5 0/3] mm: add new syscall set_mempolicy_home_node Date: Tue, 16 Nov 2021 12:12:35 +0530 Message-Id: <20211116064238.727454-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-ORIG-GUID: U_-92F2eXPJ1RDD-jqx6-vEIG3tOZx82 X-Proofpoint-GUID: U_-92F2eXPJ1RDD-jqx6-vEIG3tOZx82 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-11-15_16,2021-11-15_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 mlxlogscore=830 malwarescore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160034 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=tmPn2vHS; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf31.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 5724F10527B3 X-Stat-Signature: qy96cizp38mz9mmkjmdgx3cj9pykcbuy X-HE-Tag: 1637044949-178248 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 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 | 14 +++- arch/alpha/kernel/syscalls/syscall.tbl | 2 + 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 | 2 + arch/m68k/kernel/syscalls/syscall.tbl | 2 + arch/microblaze/kernel/syscalls/syscall.tbl | 2 + arch/mips/kernel/syscalls/syscall_n32.tbl | 2 + arch/mips/kernel/syscalls/syscall_n64.tbl | 2 + arch/mips/kernel/syscalls/syscall_o32.tbl | 2 + arch/parisc/kernel/syscalls/syscall.tbl | 2 + arch/powerpc/kernel/syscalls/syscall.tbl | 2 + arch/s390/kernel/syscalls/syscall.tbl | 2 + arch/sh/kernel/syscalls/syscall.tbl | 2 + arch/sparc/kernel/syscalls/syscall.tbl | 2 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 2 + 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 | 67 ++++++++++++++++++- 24 files changed, 119 insertions(+), 5 deletions(-)