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.8 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 BCF9DC433DF for ; Thu, 13 Aug 2020 16:22:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E00020855 for ; Thu, 13 Aug 2020 16:22:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="I3jdR/6m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E00020855 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 2A70F6B002C; Thu, 13 Aug 2020 12:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27D3E6B002D; Thu, 13 Aug 2020 12:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 194CB6B002E; Thu, 13 Aug 2020 12:22:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 02F336B002C for ; Thu, 13 Aug 2020 12:22:24 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BFFF5181AEF1E for ; Thu, 13 Aug 2020 16:22:24 +0000 (UTC) X-FDA: 77146063008.11.meat31_630117a26ff5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 905A8180F8B80 for ; Thu, 13 Aug 2020 16:22:24 +0000 (UTC) X-HE-Tag: meat31_630117a26ff5 X-Filterd-Recvd-Size: 3621 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Aug 2020 16:22:24 +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=uge1vPFGXscfZ/qc5fb5XqznesX3qbjU5Q1+WLFPWig=; b=I3jdR/6m8TYHe8dmMP0L0nc4lj /NUtxpk7Yboaz/PTUx/W4se9MHupHCKaQkYKHLqSIgEw0GmWzLoTi9CTYHcw6rflzqHFX0R6wc3UF vVeZPJjPfz+49X102s/h2Aqj011+lBpekQWG63Crx5QqQB6d4jRUyR+eAk+F1Wmb3Dm+e+IORqC3n k6IZb/xVGjUbCtysUUAINjJHIoyrxcz4BHvBa5HB/QPkVx/VleAhIPbmxA+kOMSR6/L4IE5v0IecF Ojy/kRH+P4KWDUfSBX1Vux1ffEEVGR6AYiIXzE7G1WTTeb/k8zVQ1LfWtWsYvcG97c1CDV2IBt7yZ YNOaQXkA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6FzZ-0002a2-9s; Thu, 13 Aug 2020 16:22:13 +0000 Date: Thu, 13 Aug 2020 17:22:13 +0100 From: Matthew Wilcox To: Thomas Gleixner Cc: Michal Hocko , Uladzislau Rezki , paulmck@kernel.org, LKML , RCU , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , "Theodore Y . Ts'o" , Joel Fernandes , Sebastian Andrzej Siewior , Oleksiy Avramchenko Subject: Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag Message-ID: <20200813162213.GK17456@casper.infradead.org> References: <20200811210931.GZ4295@paulmck-ThinkPad-P72> <874kp87mca.fsf@nanos.tec.linutronix.de> <20200813075027.GD9477@dhcp22.suse.cz> <20200813095840.GA25268@pc636> <20200813111505.GG9477@dhcp22.suse.cz> <871rkallqk.fsf@nanos.tec.linutronix.de> <20200813143221.GI17456@casper.infradead.org> <87pn7uttef.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn7uttef.fsf@nanos.tec.linutronix.de> X-Rspamd-Queue-Id: 905A8180F8B80 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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, Aug 13, 2020 at 06:14:32PM +0200, Thomas Gleixner wrote: > Matthew Wilcox writes: > > On Thu, Aug 13, 2020 at 03:27:15PM +0200, Thomas Gleixner wrote: > >> And guarding it with RT is not working either because then you are back > >> to square one with the problem which triggered the discussion in the > >> first place: > >> > >> raw_spin_lock() > >> alloc() > >> if (RT && !preemptible()) <- False because RT == false > >> goto bail; > >> > >> spin_lock(&zone->lock) --> LOCKDEP complains > >> > >> So either you convince Paul not to do that or you need to do something > >> like I suggested in my other reply. > > > > I'd like to throw in the possibility that we do something like: > > > > raw_spin_lock() > > alloc() > > if (!spin_trylock(&zone->lock)) > > if (RT && !preemptible()) > > goto bail; > > spin_lock(&zone->lock); > > > > would that make us feel more comfortable about converting zone->lock to > > a raw spinlock? > > Even if that could cure that particular problem of allocations in deep > atomic context, making zone->lock raw brings back the problem of > zone->lock being held/contended for hundreds of microseconds with > interrupts disabled which is causing RT tasks to miss their deadlines by > big margins. Ah, I see. Yeah, that doesn't work. Never mind.