Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbcLMXMo (ORCPT ); Tue, 13 Dec 2016 18:12:44 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751254AbcLMXMm (ORCPT ); Tue, 13 Dec 2016 18:12:42 -0500 Date: Tue, 13 Dec 2016 17:12:36 -0600 From: Reza Arbab To: Yasuaki Ishimatsu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, isimatu.yasuaki@jp.fujitsu.com Subject: Re: [PATCH v2] memory_hotplug: zone_can_shift() returns boolean value References: <2f9c3837-33d7-b6e5-59c0-6ca4372b2d84@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <2f9c3837-33d7-b6e5-59c0-6ca4372b2d84@gmail.com> Organization: IBM Linux Technology Center User-Agent: NeoMutt/20161126 (1.7.1) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16121323-8235-0000-0000-00000A2E0A55 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006244; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000196; SDB=6.00793444; UDB=6.00384684; IPR=6.00571246; BA=6.00004963; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013619; XFM=3.00000011; UTC=2016-12-13 23:12:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16121323-8236-0000-0000-000037A13E27 Message-Id: <20161213231236.g6prnnjy6nyt4qkf@arbab-laptop> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-13_14:,, 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-1609300000 definitions=main-1612130346 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1188 Lines: 28 On Tue, Dec 13, 2016 at 03:29:49PM -0500, Yasuaki Ishimatsu wrote: >online_{kernel|movable} is used to change the memory zone to >ZONE_{NORMAL|MOVABLE} and online the memory. > >To check that memory zone can be changed, zone_can_shift() is used. >Currently the function returns minus integer value, plus integer >value and 0. When the function returns minus or plus integer value, >it means that the memory zone can be changed to ZONE_{NORNAL|MOVABLE}. > >But when the function returns 0, there is 2 meanings. > >One of the meanings is that the memory zone does not need to be changed. >For example, when memory is in ZONE_NORMAL and onlined by online_kernel >the memory zone does not need to be changed. > >Another meaning is that the memory zone cannot be changed. When memory >is in ZONE_NORMAL and onlined by online_movable, the memory zone may >not be changed to ZONE_MOVALBE due to memory online limitation(see >Documentation/memory-hotplug.txt). In this case, memory must not be >onlined. > >The patch changes the return type of zone_can_shift() so that memory >is not onlined when memory zone cannot be changed. Reviewed-by: Reza Arbab -- Reza Arbab