From patchwork Mon Aug 31 02:23:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11745393 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 6834514E5 for ; Mon, 31 Aug 2020 02:24:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 362822071B for ; Mon, 31 Aug 2020 02:24:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 362822071B 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 59BDB6B0003; Sun, 30 Aug 2020 22:24:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4F8866B0007; Sun, 30 Aug 2020 22:24:05 -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 280466B0003; Sun, 30 Aug 2020 22:24:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id F045E6B0006 for ; Sun, 30 Aug 2020 22:24:04 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AB1A08248068 for ; Mon, 31 Aug 2020 02:24:04 +0000 (UTC) X-FDA: 77209268808.13.badge42_3b0d8a72708c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 7EAD018140B67 for ; Mon, 31 Aug 2020 02:24:04 +0000 (UTC) X-Spam-Summary: 1,0,0,e888e4411b8da6c2,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:1540: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-64.201.201.201 62.20.2.100;04ygnmnwhaowu4b8h17jftx937cecocmscyifj8qk7iyqocd1aummznh8zeotbx.bu8xqdhof8yuexnnisjr5kjypczerng13t4godas974k5tfgec4uqn6u34og4o3.4-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: badge42_3b0d8a72708c X-Filterd-Recvd-Size: 2080 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Mon, 31 Aug 2020 02:24:02 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01358;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U7J4DAK_1598840637; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U7J4DAK_1598840637) by smtp.aliyun-inc.com(127.0.0.1); Mon, 31 Aug 2020 10:23:57 +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 v3 0/7] mm/hugetlb: code refine and simplification Date: Mon, 31 Aug 2020 10:23:44 +0800 Message-Id: <20200831022351.20916-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: 7EAD018140B67 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: Following are some cleanup for hugetlb. Simple test with tools/testing/selftests/vm/map_hugetlb pass. 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 | 71 ++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 41 deletions(-)