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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 6187FC433ED for ; Wed, 21 Apr 2021 08:46:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E68116143C for ; Wed, 21 Apr 2021 08:46:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E68116143C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 60AA86B006C; Wed, 21 Apr 2021 04:46:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E1E36B006E; Wed, 21 Apr 2021 04:46:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A8BE6B0070; Wed, 21 Apr 2021 04:46:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id 308BF6B006C for ; Wed, 21 Apr 2021 04:46:46 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DDB795923BE7 for ; Wed, 21 Apr 2021 08:46:45 +0000 (UTC) X-FDA: 78055743570.35.2055932 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf01.hostedemail.com (Postfix) with ESMTP id 6266F5001538 for ; Wed, 21 Apr 2021 08:46:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5D7ACB1AE; Wed, 21 Apr 2021 08:46:44 +0000 (UTC) Date: Wed, 21 Apr 2021 10:46:41 +0200 From: Oscar Salvador To: Michal Hocko Cc: Andrew Morton , David Hildenbrand , Anshuman Khandual , Pavel Tatashin , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 4/8] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: <20210421084641.GG22456@linux> References: <20210416112411.9826-1-osalvador@suse.de> <20210416112411.9826-5-osalvador@suse.de> <20210421081546.GD22456@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6266F5001538 X-Stat-Signature: zg5s4jzxb8wt63bddnifpkt1mxphat73 Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf01; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1618994803-22635 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 21, 2021 at 10:39:16AM +0200, Michal Hocko wrote: > Not that I would insist but I find it better to use common constructs > when it doesn't hurt readability. The order evaluation can be even done > in a trivial helper. Uhm, I will have a look how it looks. Maybe with a nice comment explaining what is going on can make it in. If not, I can always keep what we have atm. > As I've said I will not insist and this can be done in the follow up. > You are iterating over memory blocks just to refuse to do an operation > which can be split to several memory blocks. See > http://lkml.kernel.org/r/YFtPxH0CT5QZsnR1@dhcp22.suse.cz and follow > walk_memory_blocks(start, size, NULL, remove_memory_block_cb) Ok, thanks for the link. I will have a look, but I would rather do it as a follow-up. -- Oscar Salvador SUSE L3