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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C4175C433C1 for ; Mon, 29 Mar 2021 07:49:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3218961934 for ; Mon, 29 Mar 2021 07:49:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3218961934 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 88E766B0074; Mon, 29 Mar 2021 03:49:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83F166B0075; Mon, 29 Mar 2021 03:49:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DEC26B0078; Mon, 29 Mar 2021 03:49:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 4E8986B0074 for ; Mon, 29 Mar 2021 03:49:19 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0AC948E63 for ; Mon, 29 Mar 2021 07:49:19 +0000 (UTC) X-FDA: 77972136438.34.54A05F0 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf29.hostedemail.com (Postfix) with ESMTP id 70168E7 for ; Mon, 29 Mar 2021 07:49:16 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617004157; h=from:from:reply-to: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=vFHJ4JGDDiBA44nm8xVddU83hXh/LFKuGl5xqRH1qKc=; b=c1htYbeZQB91YR1m5OPqrf+mR8rUAcSzMa/VloNbI5FSETiXYdF9JKOtrd/0R7G2yLHviW H6Qv8jJzuQl/OxYGwZdR/K7MUAMshYhNjILe8lTwZ6wzT73yJ7VhagFGCkLqG5t6DSPdl/ ITh7Z38NLoNb/F29zCoS1QNOipwZW/A= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 46305B333; Mon, 29 Mar 2021 07:49:17 +0000 (UTC) Date: Mon, 29 Mar 2021 09:49:16 +0200 From: Michal Hocko To: Muchun Song Cc: Mike Kravetz , Linux Memory Management List , LKML , Roman Gushchin , Shakeel Butt , Oscar Salvador , David Hildenbrand , David Rientjes , Miaohe Lin , Peter Zijlstra , Matthew Wilcox , HORIGUCHI NAOYA , "Aneesh Kumar K . V" , Waiman Long , Peter Xu , Mina Almasry , Hillf Danton , Andrew Morton Subject: Re: [External] [PATCH 7/8] hugetlb: make free_huge_page irq safe Message-ID: References: <20210325002835.216118-1-mike.kravetz@oracle.com> <20210325002835.216118-8-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: ciufswnwxrytbaoi9yazyqsdepygamia X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 70168E7 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617004156-758959 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 Sat 27-03-21 15:06:36, Muchun Song wrote: > On Thu, Mar 25, 2021 at 8:29 AM Mike Kravetz wrote: > > > > Commit c77c0a8ac4c5 ("mm/hugetlb: defer freeing of huge pages if in > > non-task context") was added to address the issue of free_huge_page > > being called from irq context. That commit hands off free_huge_page > > processing to a workqueue if !in_task. However, as seen in [1] this > > does not cover all cases. Instead, make the locks taken in the > > free_huge_page irq safe. > > > > This patch does the following: > > - Make hugetlb_lock irq safe. This is mostly a simple process of > > changing spin_*lock calls to spin_*lock_irq* calls. > > - Make subpool lock irq safe in a similar manner. > > - Revert the !in_task check and workqueue handoff. > > > > [1] https://lore.kernel.org/linux-mm/000000000000f1c03b05bc43aadc@google.com/ > > > > Signed-off-by: Mike Kravetz > > The changes are straightforward. > > Reviewed-by: Muchun Song > > Since this patchset aims to fix a real word issue. Should we add a Fixes > tag? Do we know since when it is possible to use hugetlb in the networking context? Maybe this is possible since ever but I am wondering why the lockdep started complaining only now. Maybe just fuzzing finally started using this setup which nobody does normally. -- Michal Hocko SUSE Labs