Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2544822imm; Thu, 16 Aug 2018 11:13:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzeTp5zoQ05GkWWcuxIlo+5Km2GujvpUl3mSvX3uzp95luyvAqcuYbojcTmuiRZKavzkWNM X-Received: by 2002:a63:f14d:: with SMTP id o13-v6mr30599446pgk.236.1534443183285; Thu, 16 Aug 2018 11:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534443183; cv=none; d=google.com; s=arc-20160816; b=dfP3UCJD+KGXvqwdZMsfKnPcv66PP6SJ0EY6OIhNw28VFkh+h3ry8osYkWOlkqGC32 jVlxdFSBE/id+p3EqMSoVoCxTdCp039+pfLY1Mx+GRL8jBtp3oGZmcwId02ktIfMeKvV BQ7OYBBxHYWSAdwifTnOxXNZ3rD4RHSAlrLrPALAX6YSTYyx/M8LmUE1lG9ho8edfuAu zDSmnHd13lqsF4aPtyb+SDqSBUufhH6oN5Wawsc9zyoNdxLxiUCTYNjoH8AVmWnuCjL0 idpk0QNdj4GGJ6Qi7GXoB48mwydEJNS5C2iWmpfNF7YL09W6zREyFbFbxbANazDSaz7Z /KVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=o8MHd+h9TmmnEONm/1L5gzWhCqPZ/+i/TlCtpk+A2x0=; b=zDokXLJ8wQ5pnBmG9Aa9feGWZm3PqUPlLqNq8zspiGwmeWy1Qn27V4QUXHxuLZOgIw ul7/v4e0CmX5zmpH2II1olUDsjgZ2cbFGcekix5Pc6tJg8awaIgHOv3dqiIQMu+jNXsK IynMBIN969aU1ayBkNR7L3NoYYccQcdqoMn1FJ7LoaBh7ZSawizD8R/eSfVEzPuOzYUd 664wuP8NoWJImKaQ7TDQ5DLFZ5OTEXE3KT8mlLTI2If6YrlkYhv5t0iBLFB8YbXG47pW jv4yJ0gCtHNQaDd+TkZ7akHN2jbwbPUFKffK25Yvv0DDJAChp0czXkaOh2w20LbNstZs 1/1w== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n38-v6si26151691pgb.536.2018.08.16.11.12.48; Thu, 16 Aug 2018 11:13:03 -0700 (PDT) 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390738AbeHPNEG (ORCPT + 99 others); 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