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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 F27F3C433DB for ; Thu, 11 Mar 2021 09:53:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75E9A64DE1 for ; Thu, 11 Mar 2021 09:53:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75E9A64DE1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DE9D08D02A8; Thu, 11 Mar 2021 04:53:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DC0D88D028E; Thu, 11 Mar 2021 04:53:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8AD38D02A8; Thu, 11 Mar 2021 04:53:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id AC8C88D028E for ; Thu, 11 Mar 2021 04:53:26 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 694A06C33 for ; Thu, 11 Mar 2021 09:53:26 +0000 (UTC) X-FDA: 77907130812.11.026F6B6 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 29B9DA0000FD for ; Thu, 11 Mar 2021 09:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FSqh2AE8rvBwoDNCIlwIFAxfELtqU/iPz0j7NKjcDuI=; b=XOKBHtSlebtELpG/48aZcF7Y0/ jzcIp+dC0dtJo7fvJVrXpKoOYnrZz41SgG493jDpqTkhJ3MsZgrYDx75a2W1zfM5hye93CtVQJrh8 P5+uCNSbQlUA58raX9tuWvtsiJeqJN+hlS3gIsGtMT++uzsaV1+2duBxrmq2rIAch5WCyl580tEwB elYANyjZWH/4EcNE9fYlL87RrGTim09Fpn534SyK4tF7VGPN9tBecC8d6gmIpKFWIMxEkYoe7LJFJ X6f43+8pUdpW3ebE4129s58ePYDlaiVo1G3eAfui3G7RuZ555Eh1Mztjh54yPnbpD8Axl6x3YJnnP 1I5H6+4w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lKHzv-0075gj-AN; Thu, 11 Mar 2021 09:52:53 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 28C85300455; Thu, 11 Mar 2021 10:52:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1270D299EE417; Thu, 11 Mar 2021 10:52:50 +0100 (CET) Date: Thu, 11 Mar 2021 10:52:50 +0100 From: Peter Zijlstra To: Michal Hocko Cc: Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Paul E . McKenney" , Shakeel Butt , tglx@linutronix.de, john.ogness@linutronix.de, urezki@gmail.com, ast@fb.com, Eric Dumazet , Mina Almasry , Andrew Morton Subject: Re: [PATCH] hugetlb: select PREEMPT_COUNT if HUGETLB_PAGE for in_atomic use Message-ID: References: <20210311021321.127500-1-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: tfrjewgzpiawwu9btzga9qpztbpp3g3k X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 29B9DA0000FD Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615456405-231036 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 Thu, Mar 11, 2021 at 10:44:56AM +0100, Michal Hocko wrote: > On Thu 11-03-21 10:32:24, Peter Zijlstra wrote: > > The whole changelog reads like a trainwreck, but akpm already commented > > on that. I picked out a small factual incorrectness, simply because if > > you can't get that right, the whole argument looses weight. > > Is there any reason why in_atomic || irq_disabled wouldn't work > universally? I just explained to you how you really wanted: in_atomic() && !irq_disabled() > > That said, I don't think you actually need it, if as you write the lock > > should be IRQ-safe, then you're worried about the IRQ recursion > > deadlock: > > making hugetlb_lock irqsafe is a long way as explained by Mike > elsewhere. Not only that. The upcoming hugeltb feature to have sparse > vmemmap for hugetlb pages will need to allocate vmemmap when hugetlb > page is to be freed back to the allocator. That cannot happen in any > atomic context so there will be a need to tell those contexts for > special casing. Then scrap the vmemmap code *NOW*. Do not merge more shit before fixing existing problems. Especially not if that's known to make it harder to fix the problems.