Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp251732pxy; Wed, 21 Apr 2021 02:02:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiVGyX9LH0G/nMnkpUabNnKeE2mK9j9lSxg9UxKs9H5eSLzj2ahA0AvqZZ6uj3m/tjtB3k X-Received: by 2002:a63:dc49:: with SMTP id f9mr20739155pgj.361.1618995748512; Wed, 21 Apr 2021 02:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618995748; cv=none; d=google.com; s=arc-20160816; b=uPXuV0GmC35WWX7FvUbFRTiqS68RV4attm3242ZsZAcoG+kZcJ62wopp0NRa9Gzzw/ 9dxW98tOifsOlHykNE1HR3maXyUUP8O0WWhkzoKG0wn4y87GPHNTTWzy2KflIi0daIik fitXPdnMx5kOLSH4Hb4z07AtveYvlRmpKrJmLje8Dx7VZtwkN6Imze/Tvcnsn6zT9L3Q DzZWUBVmU3V/q8oJ2W9jCR4c/i+xiTgc2CI4oHemJgiqd+sOgmAr8LIev8seQgb844AR TkG/mB7Rkk93R7O89RVAAlCSMcXTAjzV+e9eYF2rfMqcmDyVnt6kcNG+DRcIGJywQTpG I9FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NzTVuhKkl+PIoxl8xlvbSjcPl11t3Q2o+QemwTOw0M8=; b=YhI4IbA70Et8Oja2+Nl2OZeEr//kgmH2pwHNQDJJqMjrhyqIbPUffo7AUnl/An+4nP ZcaGMNI9R8+ziETWZ7axj5AS0DMoYMfk9AP8HkQS05Gdl2UIGaBIgoYLYn7Q8RS4FPQb hQJbTdA6CDTnCCYk6kDBbKhjbCZ89T2rziiCgG6Miebd5CSp++CBVjjares+yCLfnFN0 CW9iSGRNTAmbxQI3EOjxCQe9ft5O54RRwELs54nciigi/+Lw/Hz5nvcsCYFY4zg03yT+ mDKPSEhxAMsQWWqu7PKjT8ZfIHkjBqzexUQ5s6AAI7eNVqpWESeXNH5SbpinmCH+P9qe 4dQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 36si2029402pgt.214.2021.04.21.02.02.16; Wed, 21 Apr 2021 02:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237379AbhDUIrT (ORCPT + 99 others); Wed, 21 Apr 2021 04:47:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:39432 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhDUIrR (ORCPT ); Wed, 21 Apr 2021 04:47:17 -0400 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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