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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 0DDAAC433E0 for ; Thu, 11 Mar 2021 09:01:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 787D164FB2 for ; Thu, 11 Mar 2021 09:01:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 787D164FB2 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 DAEEE8D029D; Thu, 11 Mar 2021 04:01:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D5E8B8D028E; Thu, 11 Mar 2021 04:01:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C26498D029D; Thu, 11 Mar 2021 04:01:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id A72C18D028E for ; Thu, 11 Mar 2021 04:01:25 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 670548249980 for ; Thu, 11 Mar 2021 09:01:25 +0000 (UTC) X-FDA: 77906999730.25.56EAF21 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf08.hostedemail.com (Postfix) with ESMTP id 9A09C801914C for ; Thu, 11 Mar 2021 09:01:17 +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=1615453283; 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=CcB+wwDhIbUpya9FjTC3IoMV0ad0fmmO/z8wJ33LFgM=; b=gzHoIUpD4LkHOEvqU1uY8Cj7XJdmdL631wFyi72H3SGpQYvAd3fVJP88hioaJHvKEBxpg8 qocTUiXY506CqE8koQiGPC00grsUletAsdJbSTTFYVRjxdkNO173bo6WIiNnSwKeJmw9tD TBBL+MFDSaJCPMBppi8ZNXLPKM+1dOs= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8056BAB8C; Thu, 11 Mar 2021 09:01:23 +0000 (UTC) Date: Thu, 11 Mar 2021 10:01:22 +0100 From: Michal Hocko To: Peter Zijlstra 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: xji6togwo3xa7qg7zzfw6zgcpq9cpkme X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 9A09C801914C Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615453277-971110 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 11-03-21 09:46:30, Peter Zijlstra wrote: > On Wed, Mar 10, 2021 at 06:13:21PM -0800, Mike Kravetz wrote: > > from irq context. Changing the check in the code from !in_task to > > in_atomic would handle the situations when called with irqs disabled. > > It does not. local_irq_disable() does not change preempt_count(). You are right. Earlier I was suggesting to check of irq_disabled() as well http://lkml.kernel.org/r/YD4I+VPr3UNt063H@dhcp22.suse.cz back then it was not really clear to me that in fact we do care about spin locks more than irq disabled code. I am not even sure whether we need to care about irq disabled regions without any locks held that wouldn't be covered by in_atomic. But it would be safer to add irq_disabled check as well. -- Michal Hocko SUSE Labs