Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp340347imu; Fri, 16 Nov 2018 03:27:21 -0800 (PST) X-Google-Smtp-Source: AJdET5dGkHps7y7bpKlSwU+nNaZmmiUX6twivzTpeGd6v8V3ujtfXsix39e061WYlbp/mNxzRr8Y X-Received: by 2002:a62:6799:: with SMTP id t25mr10553141pfj.139.1542367641457; Fri, 16 Nov 2018 03:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542367641; cv=none; d=google.com; s=arc-20160816; b=rw3vLmPLwuX50tVuhwz9b9UNTmEh3H9N7ydEK8S1NHarAys/TybIgSHuzvbVilptoE mnjXUSAqh8DAUSAeagEZwExiX1F3VbIriHD+OHfRSTrmAaTlHHMmT4mXVB1RvIL7MRtf xg3gvQWP+x+Sg4KhGjVa6898cXELGoHYgB0YmIkYoIGiWUn940OOcD3De5Avz8OxjvBA 78DUlQ8vwn/KVhwKI8L42BPsItpb/AcEWGzi3lSoYosrvw52Ca4uqan+zDvI4D48ebK5 f3ckYCAm0+rUblh8+F5JyVB9jk1ggTXUVD/TdvMweGWo5xEV5yc7jAXCJL3M7KtP3ghX CQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cDYU6ssJsk14BYu9yaln49RVPnjvFNGcy+zJQh47Io8=; b=tBwIppoOLNEtLQXwtsVit96epoGfahhki4LaY4m6E4FtSVSdxhgiibHZqU0EjSdZWB UDUgB2zQM+AyecO3eF3nUT2y/7Y39KFaSr4slBkz73XAKl7qz3sKL+0xsC1Rquxm8B8k d03y7xGZOIeo2UJtW8Hy79boTZ+GjjXGO1S0MaavasDbl412anL3i7SunynfueHgi7Wz cx8Ld/gVBClmkmHrPwMdt3fsvTck6twH0OYRuYJQjWZo6uRIaQ6pkc9Shz0/CLZwPRRt EnXXPhkcObQDpnR1sihjEJ4KJm4iZYxrlOqhuPT/hP8nkP6RZ3ZM66oBIv1ghRPB0rRZ qZtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5-v6si32637851plg.99.2018.11.16.03.27.07; Fri, 16 Nov 2018 03:27:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389604AbeKPViE (ORCPT + 99 others); Fri, 16 Nov 2018 16:38:04 -0500 Received: from mx2.suse.de ([195.135.220.15]:36912 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727567AbeKPViE (ORCPT ); Fri, 16 Nov 2018 16:38:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A3F6AAC4C; Fri, 16 Nov 2018 11:26:05 +0000 (UTC) Date: Fri, 16 Nov 2018 12:26:03 +0100 From: Michal Hocko To: osalvador Cc: Andrew Morton , Wei Yang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: use managed_zone() for more exact check in zone iteration Message-ID: <20181116112603.GI14706@dhcp22.suse.cz> References: <20181114235040.36180-1-richard.weiyang@gmail.com> <20181115133735.bb0313ec9293c415d08be550@linux-foundation.org> <20181116095720.GE14706@dhcp22.suse.cz> <1542366304.3020.15.camel@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1542366304.3020.15.camel@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 16-11-18 12:05:04, osalvador wrote: > On Fri, 2018-11-16 at 10:57 +0100, Michal Hocko wrote: [...] > > E.g. memory hotplug decreases both managed and present counters. I > > am actually not sure that is 100% correct (put on my TODO list to > > check). There is no consistency in that regards. > > We can only offline non-reserved pages (so, managed pages). Yes > Since present pages holds reserved_pages + managed_pages, decreasing > both should be fine unless I am mistaken. Well, present_pages is defined as "physical pages existing within the zone" and those pages are still existing but they are offline. But as I've said I have to think about it some more -- Michal Hocko SUSE Labs