From patchwork Fri Aug 28 03:32:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11742123 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 D178C722 for ; Fri, 28 Aug 2020 03:33:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A94A220B1F for ; Fri, 28 Aug 2020 03:33:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A94A220B1F 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 698218E0006; Thu, 27 Aug 2020 23:32:57 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5F85B8E0003; Thu, 27 Aug 2020 23:32:57 -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 449218E0007; Thu, 27 Aug 2020 23:32:57 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id 2A8A48E0006 for ; Thu, 27 Aug 2020 23:32:57 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E5ED0365B for ; Fri, 28 Aug 2020 03:32:56 +0000 (UTC) X-FDA: 77198555952.25.cook35_221572e27072 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id B11081804E3A1 for ; Fri, 28 Aug 2020 03:32:56 +0000 (UTC) X-Spam-Summary: 1,0,0,169bb6d2918f2d0c,d41d8cd98f00b204,richard.weiyang@linux.alibaba.com,,RULES_HIT:41:69:355:379:541:968:973:988:989:1260:1261:1311:1314:1345:1437:1515:1534:1540:1711:1730:1747:1777:1792:2393:2559:2562:2897:2911:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871: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:21990:30012:30036:30054:30056:30065:30070,0,RBL:115.124.30.131:@linux.alibaba.com:.lbl8.mailshell.net-64.201.201.201 62.20.2.100;04y8yuh55uwg613msrmntdxfr5ospop1qmu19n9k4pchmzq694ugg7jytyasibm.zy7tbd437d7jkdqc4g1ecx3m4a1qburgefrs9n7w4j78bewd8w6hjoncgxi8q33.s-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:22,LUA_SUMMARY:none X-HE-Tag: cook35_221572e27072 X-Filterd-Recvd-Size: 2035 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 28 Aug 2020 03:32:55 +0000 (UTC) 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 X-Rspamd-Queue-Id: B11081804E3A1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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. 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(-)