From patchwork Tue Sep 1 01:46:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11747197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 735C513B6 for ; Tue, 1 Sep 2020 01:46:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B1F520707 for ; Tue, 1 Sep 2020 01:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B1F520707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3A753900004; Mon, 31 Aug 2020 21:46:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2E0E88E0001; Mon, 31 Aug 2020 21:46:51 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10D50900003; Mon, 31 Aug 2020 21:46:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id DF549900002 for ; Mon, 31 Aug 2020 21:46:50 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9D8E01F1B for ; Tue, 1 Sep 2020 01:46:50 +0000 (UTC) X-FDA: 77212803780.15.spade95_420bce027094 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 682081814B0C1 for ; Tue, 1 Sep 2020 01:46:50 +0000 (UTC) X-Spam-Summary: 1,0,0,93695dac2f34cd68,d41d8cd98f00b204,richard.weiyang@linux.alibaba.com,,RULES_HIT:41:69:355:379:541:966:968:973:988:989:1260:1261:1311:1314:1345:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2198:2199:2200:2393:2559:2562:2897:2911:3138:3139:3140:3141:3142:3352:3865:3867:3870:3871:4385:4425:5007:6261:9010:10004:11026:11473:11658:11914:12043:12291:12296:12297:12438:12683:12895:13069:13311:13357:13894:14095:14096:14384:14721:21080:21094:21323:21451:21627:21796:30012:30036:30054:30056:30065,0,RBL:115.124.30.43:@linux.alibaba.com:.lbl8.mailshell.net-62.20.2.100 64.201.201.201;04y8mr81i7p54fs1kj4uu3cyp7bouop1kqjgy5pxtytc96oe5iummznh8zeuzbc.89ezwnf13w7rb7xsisjr5kjypczerng13t4ngngicdgwuy4ip3y7imfq7psszy5.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: spade95_420bce027094 X-Filterd-Recvd-Size: 2133 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Sep 2020 01:46:48 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01355;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U7UN03A_1598924801; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U7UN03A_1598924801) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Sep 2020 09:46:42 +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 v4 0/7] mm/hugetlb: code refine and simplification Date: Tue, 1 Sep 2020 09:46:29 +0800 Message-Id: <20200901014636.29737-1-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 X-Rspamd-Queue-Id: 682081814B0C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Following are some cleanup for hugetlb. Simple test with tools/testing/selftests/vm/map_hugetlb pass. v4: * fix a logic error for patch 7, thanks Mike v3: * rebase on v5.9-rc2 which adjust the last patch a little 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: narrow the hugetlb_lock protection area during preparing huge page mm/hugetlb: take the free hpage during the iteration directly mm/hugetlb.c | 73 ++++++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 42 deletions(-)