From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760187AbcHaXiX (ORCPT ); Wed, 31 Aug 2016 19:38:23 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55192 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760032AbcHaXiU (ORCPT ); Wed, 31 Aug 2016 19:38:20 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: arbab@linux.vnet.ibm.com Date: Wed, 31 Aug 2016 18:38:12 -0500 From: Reza Arbab To: David Rientjes Cc: Andrew Morton , Greg Kroah-Hartman , Vlastimil Babka , Vitaly Kuznetsov , Yaowei Bai , Joonsoo Kim , Dan Williams , Xishi Qiu , David Vrabel , Chen Yucong , Andrew Banman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v2] memory-hotplug: fix store_mem_state() return value References: <20160831150105.GB26702@kroah.com> <1472658241-32748-1-git-send-email-arbab@linux.vnet.ibm.com> <20160831132557.c5cf0985e3da5f2850a10b1d@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Organization: IBM Linux Technology Center User-Agent: Mutt/1.6.2-neo (2016-08-21) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16083123-0008-0000-0000-00000571338B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005688; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000184; SDB=6.00752300; UDB=6.00355676; IPR=6.00525111; BA=6.00004683; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012539; XFM=3.00000011; UTC=2016-08-31 23:38:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16083123-0009-0000-0000-00003AC0F5C6 Message-Id: <20160831233811.g6kf24fdhnfhn637@arbab-vm> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-31_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608310272 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 31, 2016 at 02:06:14PM -0700, David Rientjes wrote: >The correct fix is for store_mem_state() to return -EINVAL when >device_online() returns non-zero. Let me put it to you this way--which one of these sysfs operations is behaving correctly? # cd /sys/devices/system/memory/memory0 # cat online 1 # echo 1 > online; echo $? 0 or # cd /sys/devices/system/memory/memory0 # cat state online # echo online > state; echo $? -bash: echo: write error: Invalid argument 1 One of them should change to match the other. -- Reza Arbab From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by kanga.kvack.org (Postfix) with ESMTP id C29676B0038 for ; Wed, 31 Aug 2016 19:38:21 -0400 (EDT) Received: by mail-pa0-f69.google.com with SMTP id ez1so122940138pab.1 for ; Wed, 31 Aug 2016 16:38:21 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id t2si1900469qkf.161.2016.08.31.16.38.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 16:38:21 -0700 (PDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u7VNZYUC134310 for ; Wed, 31 Aug 2016 19:38:20 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2568xs89kn-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 31 Aug 2016 19:38:20 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 31 Aug 2016 17:38:19 -0600 Date: Wed, 31 Aug 2016 18:38:12 -0500 From: Reza Arbab Subject: Re: [RESEND PATCH v2] memory-hotplug: fix store_mem_state() return value References: <20160831150105.GB26702@kroah.com> <1472658241-32748-1-git-send-email-arbab@linux.vnet.ibm.com> <20160831132557.c5cf0985e3da5f2850a10b1d@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Message-Id: <20160831233811.g6kf24fdhnfhn637@arbab-vm> Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Andrew Morton , Greg Kroah-Hartman , Vlastimil Babka , Vitaly Kuznetsov , Yaowei Bai , Joonsoo Kim , Dan Williams , Xishi Qiu , David Vrabel , Chen Yucong , Andrew Banman , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Wed, Aug 31, 2016 at 02:06:14PM -0700, David Rientjes wrote: >The correct fix is for store_mem_state() to return -EINVAL when >device_online() returns non-zero. Let me put it to you this way--which one of these sysfs operations is behaving correctly? # cd /sys/devices/system/memory/memory0 # cat online 1 # echo 1 > online; echo $? 0 or # cd /sys/devices/system/memory/memory0 # cat state online # echo online > state; echo $? -bash: echo: write error: Invalid argument 1 One of them should change to match the other. -- Reza Arbab -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org