Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2200914pxa; Fri, 7 Aug 2020 05:50:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZENHj2XyEZURKRg05mAyFYtmlmx1xHvlFP1BLprq/WbkutW9Is2B6sw1e63e32y4cnp/h X-Received: by 2002:a50:c449:: with SMTP id w9mr8940829edf.65.1596804656103; Fri, 07 Aug 2020 05:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596804656; cv=none; d=google.com; s=arc-20160816; b=hPhDkp+8S3cWcNHwA+RxVWWmeCu2+ty4GRsD5OcsEQAYhg8m5AlLl3mkKOpGz08ebN ANlNck6tbFG3kZxhp+DzWYkoZrdtGarqIEqEJCyCZmN/ta52wE/WTXwQE8X1xQONjykY m+2quC41CyL9JYwMJLfbyKfjpaFjUp2RavgNDUB6DfSZqOm16bXT5cr+yRINXVc/cVR8 BSNYHgupCGW2UGJ/pO+IiermBMQ9OZNyZjsrVYJBpyWZRLrr7ZrlYCL+yN6uZ2RLYQe4 uJ4VUrKDO6tff0U33Ec7mRtlSv0rbel4HrHCUtb3Qq/bid2VSponR7j+pCrp5T59FfFL DNug== 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:dkim-signature; bh=5HNmVJ8V8YqANDRCCq7OAfYAdNsm7pdSjptbXuLNE0k=; b=fKIfM4PBRVrJZNMjdXeLk7Bof3Kgqf5EQOvIkp6J77VTjCL7cqxlDT3vkG8licc6t2 Ahefx+xK9DTr67clXkO/jPO6Uxi7yg9ePM25jGf9gAl9neiNo22qWmpueg+i+8wanJaM HaKjc9xXPdcXKUh0uCaovej0is7riWxxkMziy1d3NpmLnZQnQO9CmocCx44+xiKjdmd+ BviZJptJxJsWITga9EnPnpkZg6spigFlB1DM4TRuV4k07vtgNE5DVPF05F6qT6Tqc5Cq 0/w0cKXx1a7CrE0hh7T1JciR2RPdq5o4RO3NYs95zb0epQB3/9CCnTngwqvNAJwYYaNK 73eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OJjp/Lu8"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si5527601ejx.388.2020.08.07.05.50.32; Fri, 07 Aug 2020 05:50:56 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OJjp/Lu8"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726204AbgHGMrJ (ORCPT + 99 others); Fri, 7 Aug 2020 08:47:09 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:56612 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726058AbgHGMrI (ORCPT ); Fri, 7 Aug 2020 08:47:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596804427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5HNmVJ8V8YqANDRCCq7OAfYAdNsm7pdSjptbXuLNE0k=; b=OJjp/Lu8X3Iy9XiLvChyTbGSOb0enmQWW4lisq03DV7CzmpvbqW99nGzyNCHydkEthZ2eG PKZa4vBT/vWQysg1ldVu1tBSYX2rWyxIwXkSJxkeFBYa951FJZtq8XKgT5ivVzZSsA+FQ4 7b+nREbuv6sIGUoHevczwSpYiitZ6gQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-1Op-OR8AM2uKyD_-Fdpo6g-1; Fri, 07 Aug 2020 08:47:05 -0400 X-MC-Unique: 1Op-OR8AM2uKyD_-Fdpo6g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3DC01800D4A; Fri, 7 Aug 2020 12:47:04 +0000 (UTC) Received: from localhost (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F9426111F; Fri, 7 Aug 2020 12:47:03 +0000 (UTC) Date: Fri, 7 Aug 2020 20:47:01 +0800 From: Baoquan He To: Wei Yang Cc: mike.kravetz@oracle.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/10] mm/hugetlb: not necessary to coalesce regions recursively Message-ID: <20200807124701.GL14854@MiWiFi-R3L-srv> References: <20200807091251.12129-1-richard.weiyang@linux.alibaba.com> <20200807091251.12129-2-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200807091251.12129-2-richard.weiyang@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/07/20 at 05:12pm, Wei Yang wrote: > Per my understanding, we keep the regions ordered and would always > coalesce regions properly. So the task to keep this property is just > to coalesce its neighbour. > > Let's simplify this. > > Signed-off-by: Wei Yang > --- > mm/hugetlb.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 590111ea6975..62ec74f6d03f 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -307,8 +307,7 @@ static void coalesce_file_region(struct resv_map *resv, struct file_region *rg) > list_del(&rg->link); > kfree(rg); > > - coalesce_file_region(resv, prg); > - return; > + rg = prg; > } > > nrg = list_next_entry(rg, link); > @@ -318,9 +317,6 @@ static void coalesce_file_region(struct resv_map *resv, struct file_region *rg) > > list_del(&rg->link); > kfree(rg); > - > - coalesce_file_region(resv, nrg); I agree with the change. But this change the original behaviour of coalesce_file_region, not sure if there's any reason we need to do that, maybe Mike can give a judgement. Personally, Reviewed-by: Baoquan He > - return; > } > } > > -- > 2.20.1 (Apple Git-117) > >