From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71000C4321D for ; Thu, 16 Aug 2018 10:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 358222148E for ; Thu, 16 Aug 2018 10:06:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 358222148E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390741AbeHPNEG (ORCPT ); Thu, 16 Aug 2018 09:04:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39204 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728018AbeHPNEF (ORCPT ); Thu, 16 Aug 2018 09:04:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 821AB8197009; Thu, 16 Aug 2018 10:06:36 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-94.ams2.redhat.com [10.36.116.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1CDE1010413; Thu, 16 Aug 2018 10:06:28 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka , Stephen Rothwell , Pavel Tatashin , Kemi Wang , David Rientjes , Jia He , Oscar Salvador , Petr Tesarik , Andrey Ryabinin , Dan Williams , David Hildenbrand , Mathieu Malaterre , Baoquan He , Wei Yang , Ross Zwisler , "Kirill A . Shutemov" Subject: [PATCH v1 0/5] mm/memory_hotplug: online/offline_pages refactorings Date: Thu, 16 Aug 2018 12:06:23 +0200 Message-Id: <20180816100628.26428-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 16 Aug 2018 10:06:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 16 Aug 2018 10:06:36 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While looking into onlining/offlining of subsections, I noticed that online/offlining code can in its current form only deal with whole sections and that onlining/offlining of sections that are already online/offline is problematic. So let's add some additional checks (that also serve as implicit documentation) and do some cleanups. David Hildenbrand (5): mm/memory_hotplug: drop intermediate __offline_pages mm/memory_hotplug: enforce section alignment when onlining/offlining mm/memory_hotplug: check if sections are already online/offline mm/memory_hotplug: onlining pages can only fail due to notifiers mm/memory_hotplug: print only with DEBUG_VM in online/offline_pages() include/linux/mmzone.h | 2 ++ mm/memory_hotplug.c | 43 ++++++++++++++++++++++-------------------- mm/sparse.c | 28 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 20 deletions(-) -- 2.17.1