Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp102925iog; Sun, 12 Jun 2022 20:30:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRpYqS/SydScsdoNcDPIVdoIqw+Sv4A/E4vGpeauApTA3kiR39Y6nCJRxvFX7Fy+BO1D7u X-Received: by 2002:a05:6402:e81:b0:432:7f12:1878 with SMTP id h1-20020a0564020e8100b004327f121878mr26867232eda.179.1655091016579; Sun, 12 Jun 2022 20:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655091016; cv=none; d=google.com; s=arc-20160816; b=ChUFWhZ2SxgQNBE8NgbtVMiAmHYKY45gyww26zQEQxuNpdk4VdV1pHucPkxMaI3ODV rwFQiFZbJf63Z7+jsVpi48nxEtLhk408gqNpKZNNvkyjPeTni1xJMnDZEYxlg7ce8Ws8 X/7qPPryZejRMP8wRKYt0F1MTNcOjePSFqqe04yD9FkNMcP9LwM48zYzO6maEa3B1dHq dnZK5y3lm6/7tNiKteVROnRbHbZksTj0aO15nYJkF763X6n7tGKhdHYpjoBwA385RCKT HQwwdrFCG0Y//YlzF58R7rhFJj9fGNjar3x/smDYqFCmU9NJN7UgTfH/0ndmCIMRMBuo W1Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=SlIL1Fzm+TodKeVPga7nRSXc+hx28aMZihbrsDRXCs4=; b=rCehME3hu/rXXNYncwixHv6wYLa8o4R+1LbXU97srF7NQH8T/j4JkDsjjkbE0Xaxxo LqbsgXzw4+4QSZ9QD8D1PNN6E7A6PftGRECYeEBIs3p+7g0iCupGmkqUkXMncLu+4V2a dSlwdxpRytDe1Uh3Qj49ZJ/v3Ujurz2tQGBDnB81jUU99/O+W0/2Cxg2NER6enIf0XCG /Ga8ZLpqvyuGzRgZnFXu9OZmKzj3ocVh/rvcyTGy0IelfmyZqfcx65GldC+5mSzSscE2 Lccn9WFNHj/hknaiYKeOtwJYcQ8+a4gMt/KyY7SejI5hfpbfp6PhZsA7cd82as73vhNe JPIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=i5REUEhb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk7-20020a1709077f8700b00718c15d6f64si1756201ejc.999.2022.06.12.20.29.52; Sun, 12 Jun 2022 20:30:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=i5REUEhb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbiFMD1N (ORCPT + 99 others); Sun, 12 Jun 2022 23:27:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiFMD1F (ORCPT ); Sun, 12 Jun 2022 23:27:05 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED09212614 for ; Sun, 12 Jun 2022 20:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655090823; x=1686626823; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=yQsTX5D9o+QT4TiAmxzoHdqWMATpMDAE+jjECvuubgs=; b=i5REUEhbbUIR+lZ7T/DHmfC+syHmOyorMx3EgZzS2VOPK+jAlHa/kMJE k4oNQIel1VHUjna9UC+JVqSPHj4JVbQDm5E/dN51p9Oj04Qgq4+tQIA/T wvTdeCxd8cYn27r7Ib4MGTOU13ITn9ccGx4VPFLCn5H2DD6jNIMljmbHi YM5Pge9+Hvn0nJtfQ8NsGgAPSioAkjqBmJGt+gj9TO15R9oKFkKW51HsE HoybwBVMcO+bhEMJg+ACuQSAEeQ1HINcz/UyibQPJvpYl7+uyQqQG3u14 SMTfmi56PeVyx4QCsZ6jLFPzc3in2r+BVhgs6FrlQ3ENiH+RLpFoMOgYB A==; X-IronPort-AV: E=McAfee;i="6400,9594,10376"; a="276921243" X-IronPort-AV: E=Sophos;i="5.91,296,1647327600"; d="scan'208";a="276921243" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2022 20:27:03 -0700 X-IronPort-AV: E=Sophos;i="5.91,296,1647327600"; d="scan'208";a="611571882" Received: from xinyangc-mobl.ccr.corp.intel.com ([10.254.214.65]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2022 20:26:58 -0700 Message-ID: <7ed1f9f544937b5c82ab380a4977e5ae22a98c43.camel@intel.com> Subject: Re: [PATCH v6 03/13] mm/demotion: Return error on write to numa_demotion sysfs From: Ying Huang To: "Aneesh Kumar K.V" , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Wei Xu , Greg Thelen , Yang Shi , Davidlohr Bueso , Tim C Chen , Brice Goglin , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes Date: Mon, 13 Jun 2022 11:26:55 +0800 In-Reply-To: <20220610135229.182859-4-aneesh.kumar@linux.ibm.com> References: <20220610135229.182859-1-aneesh.kumar@linux.ibm.com> <20220610135229.182859-4-aneesh.kumar@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2022-06-10 at 19:22 +0530, Aneesh Kumar K.V wrote: > With CONFIG_MIGRATION disabled return EINVAL on write. > > Signed-off-by: Aneesh Kumar K.V > --- >  mm/memory-tiers.c | 3 +++ >  1 file changed, 3 insertions(+) > > 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; > + How about enclose numa_demotion_enabled_xxx related code with CONFIG_MIGRATION? >   ret = kstrtobool(buf, &numa_demotion_enabled); >   if (ret) >   return ret; Best Regards, Huang, Ying