Message ID | 20220610135006.182507-4-aneesh.kumar@linux.ibm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 12BC1C433EF for <linux-mm@archiver.kernel.org>; Fri, 10 Jun 2022 13:52:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B8FA8D00A0; Fri, 10 Jun 2022 09:52:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 940288D009C; Fri, 10 Jun 2022 09:52:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 793418D00A0; Fri, 10 Jun 2022 09:52:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 655EC8D009C for <linux-mm@kvack.org>; Fri, 10 Jun 2022 09:52:11 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 3F7FB12115F for <linux-mm@kvack.org>; Fri, 10 Jun 2022 13:52:11 +0000 (UTC) X-FDA: 79562465262.29.3F5904D Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf14.hostedemail.com (Postfix) with ESMTP id BB98910005E for <linux-mm@kvack.org>; Fri, 10 Jun 2022 13:52:10 +0000 (UTC) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25ADgfkE000541; Fri, 10 Jun 2022 13:51:13 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=yPR26Ihb5In/eBRJL5MvPvXGtjwasSeSjglyfb726gs=; b=in5N8kr8AGgz/T9k30XV7pxXCfgjVsr01UdIEQVHOguc6hP8roOPPCeDQ+mcGicvmYe/ u8kO19ZCy4e0nwmebIFpnAVepFVdf/Z+dERicbVlvURaOs4E24D/Eb3z4Sx90bbzrVAw odYhcaTU078VkbwnaT9BAUsXRFwYYq+OkZc+ttlDufYGM22sWXMYLkMgPfTC9e/heC5X Azi2517R9ilUanjl9RS+C8DPV+GsnHEpfxddcGvmJMMRyPQtXZx74VHIqzxR2qUpzqgF PzFEN1g8c+8kBN86py2a+LtGdVDl9ioRiEO7fdh+xhQEZ0e1fCzVHP+qT5GIdhg6+Ajt iQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gm72vr517-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:51:13 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25ADhK9S001912; Fri, 10 Jun 2022 13:51:12 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gm72vr50m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:51:12 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25ADZYfO004860; Fri, 10 Jun 2022 13:51:10 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04wdc.us.ibm.com with ESMTP id 3gfy1a91m2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:51:10 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25ADp9Pb33161638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jun 2022 13:51:09 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0A256A04F; Fri, 10 Jun 2022 13:51:09 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D70816A047; Fri, 10 Jun 2022 13:51:00 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.90.151]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 10 Jun 2022 13:51:00 +0000 (GMT) From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: Wei Xu <weixugc@google.com>, Huang Ying <ying.huang@intel.com>, Greg Thelen <gthelen@google.com>, Yang Shi <shy828301@gmail.com>, Davidlohr Bueso <dave@stgolabs.net>, Tim C Chen <tim.c.chen@intel.com>, Brice Goglin <brice.goglin@gmail.com>, Michal Hocko <mhocko@kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Hesham Almatary <hesham.almatary@huawei.com>, Dave Hansen <dave.hansen@intel.com>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, Alistair Popple <apopple@nvidia.com>, Dan Williams <dan.j.williams@intel.com>, Feng Tang <feng.tang@intel.com>, Jagdish Gediya <jvgediya@linux.ibm.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, David Rientjes <rientjes@google.com>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Subject: [PATCH v6 03/13] mm/demotion: Return error on write to numa_demotion sysfs Date: Fri, 10 Jun 2022 19:19:56 +0530 Message-Id: <20220610135006.182507-4-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610135006.182507-1-aneesh.kumar@linux.ibm.com> References: <20220610135006.182507-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: wsOflKyuQQ6kerx4rvuXMyB2h2OdWTpT X-Proofpoint-GUID: 1jmwotiMe_9hcyx1m5R317l0TvWtzFV6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-10_06,2022-06-09_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 mlxscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206100052 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654869130; a=rsa-sha256; cv=none; b=Jq9fzO/ShX8kNS9dmsslk3/Jd8C6JtjvuBiDS6XccgiKtJYFUOBPT0KTVJZjyfoxMIadh9 JBZdYKNbUOczB2e9+y7HwZVb46tOfpNbktPSd3na69uhhf0u0sMjikggTSApU+BHBO2Uae yF+Lg4FKIFpSeRvqUzeo1c7jrcap8fQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654869130; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yPR26Ihb5In/eBRJL5MvPvXGtjwasSeSjglyfb726gs=; b=aOBg998hMh8eJ3wBeV49tH6f/f5W20Kg3PewaiTMeLe3GyB8sPEw48RyOkH6PDgXP/qDeK hSBSxoArI/dqwZHQ0dzlnGGyIVLEGKJZe2yyvBtqQJ0b5hS0r5SkjKI0/7++hUIaFvCZCf 7K1cFLqtT1vL6exY6wBHDwyGBimiMok= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=in5N8kr8; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf14.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=in5N8kr8; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf14.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-Stat-Signature: fgrbskf7aeo44irr8rgktfzur3iw91cn X-Rspamd-Queue-Id: BB98910005E X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1654869130-769420 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: <linux-mm.kvack.org> |
Series |
mm/demotion: Memory tiers and demotion
|
expand
|
diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index 9c6b40d7e0bf..c3123a457d90 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -105,6 +105,9 @@ static ssize_t numa_demotion_enabled_store(struct kobject *kobj, { ssize_t ret; + if (!IS_ENABLED(CONFIG_MIGRATION)) + return -EINVAL; + ret = kstrtobool(buf, &numa_demotion_enabled); if (ret) return ret;
With CONFIG_MIGRATION disabled return EINVAL on write. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> --- mm/memory-tiers.c | 3 +++ 1 file changed, 3 insertions(+)