Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2533534imm; Thu, 16 Aug 2018 11:02:23 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzwmMiex4Ikr/7MHKKH8hdLEO4qOmsGziojWiuRmMbzJjtO3fmmhXCaVaF6ms4gO2VHgW9M X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr29730862pla.131.1534442543241; Thu, 16 Aug 2018 11:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534442543; cv=none; d=google.com; s=arc-20160816; b=FaHx2eHalQSrg/xNBaq0vLIH0ywUEGM7WP0XnIiez3On/0S4+V0bM4c61FN2IWjpO7 k3T/ZcqWEgS3l4GloRMtNR/fj7O08RxpLvbzuJJTqxWDp+PidI/4mq2wUt7Tjwjkb856 CXUc7GoneVUjO0vtCNCS9faSJr0X5A1cyb6QfYP/sQcWXWITv4dMXrhKlpo6fY6rJJFe kB2sQdXFJopZqZciSqQF5/PjnQ7GOAtfz3QxQiU3Bb2sVETBiDXHVt8fB9GoY2bwO2AA eD1Iv30ZX5f48qHQBf7TlZAMAILto2IrjYJj6M2Jg/QeTdL+Fh3BO+DyBXYcn/edGxDr IoBQ== 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:arc-authentication-results; bh=8AhVT0lZxlSJXddYcz8ILsnXrHfl0DH3qmhnwDP60Ys=; b=bu4jv7VK7lNfe2qLzvF2LeUFHY0X34CLTnP0IcCCBOFrjzBK4Vosv0WmLFwrJRdkJk qnMWI8P2EtEcSBMcYD7xUG3DhBLfdNb1xqApvvnokXzMG1QhmPvW8Cu1+QZiSmzbXNvZ 7z7puNYqiYeMYgG/JiE1iZLZumlkLxxQwjaP+dGGAnY4DZ+hGHl/AszUjSLfntUDiTuY libjjeeD0wgizFQ3fJl8OHvuH0Xfhyg/Iq0LsXmgVLikScoIkz3i1z79hiP+MtW0cTSY odMAY/erOTEDKGE0zM3WjpTR9Tbx78gzVq7N23WrwA1wWb7GyPpXx3Lt0rDkRpjqx2HY 3CBg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n61-v6si22102448plb.132.2018.08.16.11.02.08; Thu, 16 Aug 2018 11:02:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391418AbeHPPcy (ORCPT + 99 others); Thu, 16 Aug 2018 11:32:54 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41807 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbeHPPcy (ORCPT ); Thu, 16 Aug 2018 11:32:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id j5-v6so4014608wrr.8 for ; Thu, 16 Aug 2018 05:34:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8AhVT0lZxlSJXddYcz8ILsnXrHfl0DH3qmhnwDP60Ys=; b=oJh7bJjTUfMAv1P6tZoolUAI0rbj6Reydw+vxlrpMNIla6k1cB4U7g3R8ySQTIm+6G mW6BXtNL5Wu1oJbMfMAAt2sNUGTEsTaUZUgJKd/rBYzVGUeeX2H4Q3LhOfpX+Ar+g2RY yt/vAn0zo5iTEF98bXUpkp4vxoGVEAsMh6NsEZOStTpW8QFMICDHORv8eCJDjxNnutCO Mld5riJlo3BJv3OvCEtekux2m4rsIm+c9/TrSoNE0NjbAHhIhM+9A1RDFgHe+s9xeGkN UZbJ5bj3imP4+z2WZj2qelnsJCKA/F+yKnJGKn9uvoGxJ8CanY75T0SDYhRR4POFasQh mjvw== X-Gm-Message-State: AOUpUlHkT+en2/usJFymFXumfewJ/7SK8EGkhQqcro1VuXFBDk85HtyK fr/Em5HDUFIoiHck6gI6214= X-Received: by 2002:a5d:694e:: with SMTP id r14-v6mr18771632wrw.278.1534422874530; Thu, 16 Aug 2018 05:34:34 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id 9-v6sm64224235wrb.48.2018.08.16.05.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 05:34:33 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 0FA071248E7; Thu, 16 Aug 2018 14:34:33 +0200 (CEST) Date: Thu, 16 Aug 2018 14:34:33 +0200 From: Oscar Salvador To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, 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 , Mathieu Malaterre , Baoquan He , Wei Yang , Ross Zwisler , "Kirill A . Shutemov" Subject: Re: [PATCH v1 2/5] mm/memory_hotplug: enforce section alignment when onlining/offlining Message-ID: <20180816123433.GB16861@techadventures.net> References: <20180816100628.26428-1-david@redhat.com> <20180816100628.26428-3-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180816100628.26428-3-david@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 16, 2018 at 12:06:25PM +0200, David Hildenbrand wrote: > onlining/offlining code works on whole sections, so let's enforce that. > Existing code only allows to add memory in memory block size. And only > whole memory blocks can be onlined/offlined. Memory blocks are always > aligned to sections, so this should not break anything. > > online_pages/offline_pages will implicitly mark whole sections > online/offline, so the code really can only handle such granularities. > > (especially offlining code cannot deal with pageblock_nr_pages but > theoretically only MAX_ORDER-1) > > Signed-off-by: David Hildenbrand Hi David, If you are really willing to move the checks from this patch[1] to online/offline_pages, you might consider to put that in as well. So we have a function that checks for everything, and not multiple checks. Another thing is that I would have prefered to take the checks up to memory_block_action, but offline_pages gets also called from ppc-memtrace code. Other than that, Reviewed-by: Oscar Salvador [1] https://patchwork.kernel.org/patch/10567277/ Thanks -- Oscar Salvador SUSE L3