From patchwork Mon Apr 5 23:00:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 12183817 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 48EA0C433ED for ; Mon, 5 Apr 2021 23:02:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DC36461205 for ; Mon, 5 Apr 2021 23:02:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC36461205 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 609C56B0080; Mon, 5 Apr 2021 19:02:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E3A06B0081; Mon, 5 Apr 2021 19:02:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C2616B0082; Mon, 5 Apr 2021 19:02:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id 18A036B0080 for ; Mon, 5 Apr 2021 19:02:04 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C2F64180ACEE6 for ; Mon, 5 Apr 2021 23:02:03 +0000 (UTC) X-FDA: 77999838126.21.1FBA997 Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by imf08.hostedemail.com (Postfix) with ESMTP id 2BB8680192DA for ; Mon, 5 Apr 2021 23:01:57 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 135MxsqS005021; Mon, 5 Apr 2021 23:01:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2020-01-29; bh=ztO9NuDcGbIfIeVAyvt8JiBahWGkgMKLgC08KIhDAXk=; b=JqWF5zvhYEjSd9Hmm+kNRCZK3ZiZFGsptHVY1VCkX7XBtVcfvnwO+iRCbGz4sab94nhe olrhLDZq521FNHzokDsj74Io6yiRlbHqTaT7UnehzaLRov2+jbc+8Cp4sECPMO89ajUR UFubPMQGWv50YWlGkwId+0tWMtJvZ3amQjEQBKB56YBmxr0GrqGQC7BkkbhI1e8Xo0q6 xLEngBmO4b3gnKlDsqjqLZR3cdRpAA7HKHgjNIOreXQ2FQfBTukg0kbDZ7w0sOOab9o8 ZAMisL/E5kzkCWOeDP2BxZto2kfwBCgcJVqPEIxcyYyLjJfEzEf25ddvVOymDP/m6mav eg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 37q3f2bkn6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Apr 2021 23:01:27 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 135MsxPn038332; Mon, 5 Apr 2021 23:01:27 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2047.outbound.protection.outlook.com [104.47.66.47]) by userp3020.oracle.com with ESMTP id 37q2ptgmh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Apr 2021 23:01:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BqIP3AleReQgNvq/miwPwTnGjlb3lPZakP9dT5v2UF1i3rIsIJnjb6fkzic0Og9fx/RA4G2of6Ur3zrDcP49sYR434E2d3LDyqTtH+r+SKKdBqO2LGHfEDjI7p9m9aluZBLADSuNl699gQCOvfHHcKCccBUo0IjIg30XUxooGl6XKrRESYVx2kJV8OEcjPGOFMLEIjVzR3D1ZoSUBbMRMtpDfaei6H5qqOPuS5k/r8zssJRJG16ju1avf3Kum9I/TIuy58dKkj7s78c4svSg7EMd852HwFAp8tHKJqJVa/TyWDmej0FODbSKjoD4OVILVJhuUv3phg/GFkpKqOlc8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ztO9NuDcGbIfIeVAyvt8JiBahWGkgMKLgC08KIhDAXk=; b=Yb8V5/y6fMoaFj1H7qiaJnSAjXKUvhYd8e6SNidWgQqIyCGyc1SdtABat+ZNH/rHFJ52X99KBjm/xX+BaqoQ5X/Nw6YHggIbgoBqZ/MrUXBYD3nS1OdXnPPzi5lzXSwjNXPg8Qn8TO5+y92/5pOikOKpF0ritTCJ9N9QLGSk/LjKEYen0RqeUn/i/VToNnRQ7lVouHC+vuBn9Nxvc7rdIw8ElzEUBuu/9luqisYwZB/qv3uMOEDK5861q274gQzmwazoe8eSaF83fjgfj+Wbj8gaELHPuV9B0o4JDthQ4NBKrpzWb9q58U7c3cTAmHWNBLO8ZuopSFMTqawJ48a8Jw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ztO9NuDcGbIfIeVAyvt8JiBahWGkgMKLgC08KIhDAXk=; b=kC9MuvLkmzZvqxLEoLsheWD0ooEUP5zNgMBXoffpIFzRtm9UzB3/cqjgQuw67hR4CwGJAXMt9LnheQsqnjmpQSuFRYE5XN8h2HriqZ383dWKYhHx4wdoKw75FRWVhEMTDnZToBImJIEi7gc6X+o1jhoSBLQxwGoiJvbpKTbbAh4= Authentication-Results: kvack.org; dkim=none (message not signed) header.d=none;kvack.org; dmarc=none action=none header.from=oracle.com; Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by SJ0PR10MB5424.namprd10.prod.outlook.com (2603:10b6:a03:3bc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Mon, 5 Apr 2021 23:01:25 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::980e:61ba:57d2:47ee]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::980e:61ba:57d2:47ee%6]) with mapi id 15.20.3999.032; Mon, 5 Apr 2021 23:01:25 +0000 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Roman Gushchin , Michal Hocko , Shakeel Butt , Oscar Salvador , David Hildenbrand , Muchun Song , David Rientjes , Miaohe Lin , Peter Zijlstra , Matthew Wilcox , HORIGUCHI NAOYA , "Aneesh Kumar K . V" , Waiman Long , Peter Xu , Mina Almasry , Hillf Danton , Joonsoo Kim , Barry Song , Will Deacon , Andrew Morton , Mike Kravetz Subject: [PATCH v4 2/8] hugetlb: no need to drop hugetlb_lock to call cma_release Date: Mon, 5 Apr 2021 16:00:37 -0700 Message-Id: <20210405230043.182734-3-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210405230043.182734-1-mike.kravetz@oracle.com> References: <20210405230043.182734-1-mike.kravetz@oracle.com> X-Originating-IP: [50.38.35.18] X-ClientProxiedBy: MWHPR18CA0031.namprd18.prod.outlook.com (2603:10b6:320:31::17) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from monkey.oracle.com (50.38.35.18) by MWHPR18CA0031.namprd18.prod.outlook.com (2603:10b6:320:31::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27 via Frontend Transport; Mon, 5 Apr 2021 23:01:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e5c31151-acfe-4462-5a5f-08d8f886bbe0 X-MS-TrafficTypeDiagnostic: SJ0PR10MB5424: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6TJaV6WiTW0VN/4iUrdN0y/zOjd1tMfF99gTxgtucwEePEOqEJg73uXV6U6SmUHqCod/mnVeH6ofBBS7BD2DPL4AQbKD4noSPRGH4JZaDt1thxOJE6mArtF6Oq/HRD/Zm/iD+M0rNH68ZvgWi6lcBi6Klr2Pb+5nfH+Pe49d7xNpVeXZsny2uy+js5EENdsu/zk4jRn8c5mA9gwzZhULjswRBAc19EmdiGIq2rNk625gVl1qP8zUl61LX5/+/vZ/jDSAuNkNmYNdd02F9glDEzgSVPms+VVP4QboENNqxf9WeZS3QwWNo2T0B1uIMzTqftJlsdG5T7mG7tXnPDo3ZSOocxAYkqJeFOOHwyrprLLqm2zH2lg6Kz9RL/NcMsF3XVJ7B8PWev82ds74QiBDEGPzVe3pO5zjrCh/NHJCnw1lxtPIe6vL48w9DfT+iiTBJp1oR9zyocOQJIiNFwCX3vxCoLJ+ziQMmg33TfnpOAX60P16/ZWiesEZNKT1mJaOh1jAP15u/FZYEvPHdEcsqIG35IvtPn2Ya+Cbktp0bSPIhGZcFz11i08LfO5JGoLjd6SbapgmA5YuIdkL9fCKU0NvKLyp9LK7sQICw91hZukU6MFRoMKTt6LkrfTV7nT9PDhbNadNGi2l3LSLGe//sZsHQ3lMOTiH/eQmGnB5RJBIEn21r/iA1lpmovIyoIL8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(376002)(366004)(346002)(39860400002)(396003)(66556008)(478600001)(66476007)(6486002)(66946007)(8936002)(52116002)(316002)(54906003)(4744005)(7416002)(38350700001)(83380400001)(7696005)(8676002)(1076003)(107886003)(956004)(186003)(2906002)(26005)(86362001)(6666004)(38100700001)(5660300002)(44832011)(16526019)(4326008)(36756003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: z4be6VyDXc0Er3fTN6P39+6T3LC+CO9r+hitB9Jo2bWZxPfk164GAW27nXJ2ycOZ4eJSD1GHyREcYQwEhopYgg+7+qe2sX79tOlW4qpo7HOmwYXuMzrXplDrhF6AZ0//MQNMHwQ3kWm2/43bgxYUcp1gnSVFTAGdF9i0fBPJwwQs4ioZXIZHRjy5bffk7yi8Wc90psPUANCaOXFTg7bpqCCZerCSxMGFVXHUvP0LWKZ/SB26kb2hAFsJV+7wQNv76ZIHE0XY130fWf3EgAOAMzb/GEMUFsh4rEPEgifFc0110z0xU+gh4Z3gFsP3+DBxRTS5yF2I2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5f-08d8f886bbe0 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2021 23:01:25.0094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iRJ0DA6pdq8ynLklDDKubBAgYyVv2ipDdWhxGisNbI2zVEKZtcDLTAlbhSOwgIqodnczcLDlwYP964/lsvt72Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5424 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9945 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104030000 definitions=main-2104050152 X-Proofpoint-GUID: N-4FeMF-y2OmR0sLQ0ti77JjdjJ3hZ0b X-Proofpoint-ORIG-GUID: N-4FeMF-y2OmR0sLQ0ti77JjdjJ3hZ0b X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9945 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 suspectscore=0 spamscore=0 impostorscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104030000 definitions=main-2104050152 X-Rspamd-Queue-Id: 2BB8680192DA X-Stat-Signature: aj5fomtttdejb9bu4z3xtent46psad1t X-Rspamd-Server: rspam02 Received-SPF: none (oracle.com>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from=""; helo=userp2120.oracle.com; client-ip=156.151.31.85 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617663717-331021 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: Now that cma_release is non-blocking and irq safe, there is no need to drop hugetlb_lock before calling. Signed-off-by: Mike Kravetz Acked-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand --- mm/hugetlb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3c3e4baa4156..1d62f0492e7b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1353,14 +1353,8 @@ static void update_and_free_page(struct hstate *h, struct page *page) set_compound_page_dtor(page, NULL_COMPOUND_DTOR); set_page_refcounted(page); if (hstate_is_gigantic(h)) { - /* - * Temporarily drop the hugetlb_lock, because - * we might block in free_gigantic_page(). - */ - spin_unlock(&hugetlb_lock); destroy_compound_gigantic_page(page, huge_page_order(h)); free_gigantic_page(page, huge_page_order(h)); - spin_lock(&hugetlb_lock); } else { __free_pages(page, huge_page_order(h)); }