Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1388376pxk; Mon, 31 Aug 2020 18:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZVSBIIodB5vQfhX/q6ijAIfMoSLmUYsQPvCxpRmkPL5HfH7+3Tl1ZXSTZq/PnHq56XWG5 X-Received: by 2002:a17:906:60d5:: with SMTP id f21mr3426976ejk.94.1598924881996; Mon, 31 Aug 2020 18:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598924881; cv=none; d=google.com; s=arc-20160816; b=Iuq/rgMgzVu3e4in/aWYhZJQzinjJYZ73Ps80JH8T0PHjVKM3X9ArDmAHVGD2aBSzD Re4XyNtha9qNCysprv/Lt3tmqX+xM+3tjxNDWH3SX8Ou8gznSjwSsiXgughSrxy8Mlhy TU3wXMpRD+3UZOtNvknFsm2D7B946CUZvvUjZIKcrbFScf9wFCRwAXSQghB/3gNDRJR4 TKGx9NlNwHNsueEoTlcqh+oaj7AHPOa4wZQ+jAgl2MK3D4LRres+4P6jsmxhXxDVW0oP 0NOsNrz2ptcUwbfP+7kCsfMwhPQMy3y8v3+r4gzu5+c6fEHYSkUiD9S/qfUgxkBUoa/e mcdQ== 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=DhfU57953jhXpneVipD7z/tszSJDHvjhujKo85emkEI=; b=t68lTVzEr57VhDJrjHN23Y7d2vP9aOJrkSA1fIGLArQZbqp3AsA2WdEgS5ld0XTmH4 jxbicbKiYBcB8chOkEoZuhKnX4VGqawJNRo3eeMactK9BQfYWhztN/CrBckPMyacFJA/ 5NvVMjSn1+oVgAOjezmWXUD/HR9P0azHgDn1yNkicK7+tKDjk/Mk6Dx3ee68+jPxVMDi 5qzUqkHNU0BTGXNQ54rgR2lMeDfOat+eOlT8b0FVR1KSczOxkxfhjI7oGPB97Tr4i8IF kPiNaWgyKFPBfDOlieR85BDbWrnTYHJTaeIRqznNZ8TgwbkXLvP/J/bTWdW+4HY5wwsg S+yg== 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 u22si1591970edy.599.2020.08.31.18.47.39; Mon, 31 Aug 2020 18:48:01 -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 S1726386AbgIABqt (ORCPT + 99 others); Mon, 31 Aug 2020 21:46:49 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:35196 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgIABqp (ORCPT ); Mon, 31 Aug 2020 21:46:45 -0400 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 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. 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(-) -- 2.20.1 (Apple Git-117)