From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2BA7C433E1 for ; Fri, 7 Aug 2020 13:12:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75F7B2224D for ; Fri, 7 Aug 2020 13:12:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LAYa/0v1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75F7B2224D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 162178D00A2; Fri, 7 Aug 2020 09:12:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 112358D003B; Fri, 7 Aug 2020 09:12:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0502D8D00A2; Fri, 7 Aug 2020 09:12:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id E31BE8D003B for ; Fri, 7 Aug 2020 09:12:17 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9EB9B82499B9 for ; Fri, 7 Aug 2020 13:12:17 +0000 (UTC) X-FDA: 77123811114.06.bear83_091531126fc0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 625B8100429AF for ; Fri, 7 Aug 2020 13:12:17 +0000 (UTC) X-HE-Tag: bear83_091531126fc0 X-Filterd-Recvd-Size: 3237 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Fri, 7 Aug 2020 13:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596805936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qWWhix4iLlIv8Eh/yS1VGX8cFoAQVQWfFsfEg6TWH78=; b=LAYa/0v1NiJ+BSRC7Q7b4QP+ism6wV48D4oZ/QhRkWxZdlSKoeN9BTj+oVZeE5S1meJVBt aSp8ZM6VPay2HSp7McaqGLMOKIV11/mUBNIM7GJmru2+eGN78rdjsk5Zbh8Mc51FonhIvF LQIU0FcU8AL8PKbAsoOIcB5aXom0tU8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-KLTXhLBmMg283fbQYZRAHA-1; Fri, 07 Aug 2020 09:12:12 -0400 X-MC-Unique: KLTXhLBmMg283fbQYZRAHA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 609381800D4A; Fri, 7 Aug 2020 13:12:11 +0000 (UTC) Received: from localhost (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEAD81DB; Fri, 7 Aug 2020 13:12:10 +0000 (UTC) Date: Fri, 7 Aug 2020 21:12:08 +0800 From: Baoquan He To: Wei Yang Cc: mike.kravetz@oracle.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/10] mm/hugetlb: narrow the hugetlb_lock protection area during preparing huge page Message-ID: <20200807131208.GT14854@MiWiFi-R3L-srv> References: <20200807091251.12129-1-richard.weiyang@linux.alibaba.com> <20200807091251.12129-10-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200807091251.12129-10-richard.weiyang@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Rspamd-Queue-Id: 625B8100429AF X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: On 08/07/20 at 05:12pm, Wei Yang wrote: > set_hugetlb_cgroup_[rsvd] just manipulate page local data, which is not > necessary to be protected by hugetlb_lock. > > Let's take this out. > > Signed-off-by: Wei Yang > --- > mm/hugetlb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 9473eb6800e9..1f2010c9dd8d 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1494,9 +1494,9 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) > { > INIT_LIST_HEAD(&page->lru); > set_compound_page_dtor(page, HUGETLB_PAGE_DTOR); > - spin_lock(&hugetlb_lock); > set_hugetlb_cgroup(page, NULL); > set_hugetlb_cgroup_rsvd(page, NULL); > + spin_lock(&hugetlb_lock); Looks good to me. Reviewed-by: Baoquan He > h->nr_huge_pages++; > h->nr_huge_pages_node[nid]++; > spin_unlock(&hugetlb_lock); > -- > 2.20.1 (Apple Git-117) > >