Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp906989pxa; Thu, 27 Aug 2020 20:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxiGyjE7NBs+DwEX8jMwwpiZhQmUMNhPBZIGUnLqcqLyy+Qq4Lfr8DFCwXW+mz6Bor4n1c X-Received: by 2002:a17:906:a0c2:: with SMTP id bh2mr8208026ejb.493.1598585627046; Thu, 27 Aug 2020 20:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598585627; cv=none; d=google.com; s=arc-20160816; b=FQGO+TyFdSq+b8Cul5T9tR3vTmPNluvBt4DaSJ5+jcMVKwP81swNJGb4yWi+/pakTs nM+GGZgDE/MadRpC/CmN9IZpiNOJUUWVfU60WRDwm3EBGO5RlQ6wiMyoi3sfJYP4RuHh LUNuw4c14nkwxHOGaJZzUyB9nVoqkeuz5YgUie6qyBbXFDJxXS1sliAzJM0/hwe5Gn3t QhAKaumTSAgDMqIGl6pOlbnu3nEoTXhrvdlP9DS2qpjpy7z5N5FgdtNgdeUppthd0xtK S2hUWgkJ81cJjlfpoV1ovx9d6iZlsMXREsG8VcaOa90LXSwOJN6yAbSLALrcHl7oS84F BOeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Jaqdz56tJ0zjEMm6l3k8cmeO24vAi8MACQA5IuWx31I=; b=bkMJhfBCAF6ss9dIxfPDT4uQe36rqYj9tG+YvM66DoI6XpgAQ0JIQhcV49qwYQ7L8k 9pZN+GZcQeBFcnBS87HgJZCUgt9JCD17s9q4bR7+u61+YcYr8uvkDgXWzl4A2CkFp1w/ /T9DwczAifdNpjEyZ/nVcKHFSc100ZNoNwmYdAo9UeXuPzPCDmuBTMeLI3SJU4xnUONy cpf4O/Z1pg+gPg9aNGnmH2JiLoVUtmVI9FsgvQuWUbNDr6suT3jNnFkOvg5QcqMtd8bq TBfNHFyLhabzAD0zDx34/KOMeJqOLMCyGd/UgtixNJVfjIU50OWGbwtv2rf4uI9sjWSR +Glg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si3094422ejk.264.2020.08.27.20.33.23; Thu, 27 Aug 2020 20:33:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbgH1Dcw (ORCPT + 99 others); Thu, 27 Aug 2020 23:32:52 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:50465 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727892AbgH1Dcw (ORCPT ); Thu, 27 Aug 2020 23:32:52 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R691e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07484;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U736V19_1598585570; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U736V19_1598585570) by smtp.aliyun-inc.com(127.0.0.1); Fri, 28 Aug 2020 11:32:50 +0800 From: Wei Yang To: mike.kravetz@oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, bhe@redhat.com, Wei Yang Subject: [Patch v2 0/7] mm/hugetlb: code refine and simplification Date: Fri, 28 Aug 2020 11:32:35 +0800 Message-Id: <20200828033242.8787-1-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following are some cleanup for hugetlb. Simple test with tools/testing/selftests/vm/map_hugetlb pass. v2: * drop 5/6/10 since similar patches are merged or under review. * adjust 2 based on comment from Mike Kravetz Wei Yang (7): mm/hugetlb: not necessary to coalesce regions recursively mm/hugetlb: remove VM_BUG_ON(!nrg) in get_file_region_entry_from_cache() mm/hugetlb: use list_splice to merge two list at once mm/hugetlb: count file_region to be added when regions_needed != NULL mm/hugetlb: a page from buddy is not on any list mm/hugetlb: return non-isolated page in the loop instead of break and check mm/hugetlb: narrow the hugetlb_lock protection area during preparing huge page mm/hugetlb.c | 77 +++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 43 deletions(-) -- 2.20.1 (Apple Git-117)