Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1329011pxb; Fri, 26 Feb 2021 08:08:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr6/c53WY0z38PrGqG3EFxMNEFxTyoz3s4vkxjiHK+vYOMrsxFIckMg1gTFTeTsW0+HM+H X-Received: by 2002:aa7:d5d3:: with SMTP id d19mr4177827eds.216.1614355700089; Fri, 26 Feb 2021 08:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614355700; cv=none; d=google.com; s=arc-20160816; b=qSkLQp/Snze9CDiWd27/a4BRHfBJCewDCGbzc8frJHVeX0ztKj+chUq1jrQCw8StEj mZkXVNtRu/wYYQd9SAm4PINUW6gacK5V6ZSLEtJS3SzYlYBaLkW6daV9/3UNcoCrIK0W u/r4J4k7l+UjQDP6A4UqyxVM6BR3ibeqg7iVz7nU13glOfmQwLhHEeTaf9BGn0kSKY2E Y82RwLUft3K2+IeWd+CICyIAexGTncOw8RbDqJaiTOD3KPKJOtv2UQfRJlQEB0Gfar/a 3dmlNeBPrA3secl74w/Uj/oKEC9yFHIamsuKC0L1+pqlNg5SG6BgGc1lZaUo6g6ubU50 S8rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nlrPN6RKsKi94KSjI+2dR6vaJd54WtU/wGcRKq1SGac=; b=DiTAxhWyQOvzss143uMF64scDmutBoaYikKJsB3NoBHe1OkpAlQoMThS91otPky8Bf hmDZhvfRJFKwkjO/5Q42u5euXhbWz3Ae1JeqaubYMQhqza/AI+bhhGObTIVj6p+XSDm1 7hz3XxgefMBEadYsjImEcISdmdqzu6jZi7Th5/JncHqXBNEGEN669s9v24XgirmX/d32 QTIwzoNeuisX4X61jYuG5l1H1agwRQob5l2Z0+FG9x7jGdlt/Ct6XPMELZTe4I2NfNSe Lv7j31kAg3AMeSB5tqdfZ6GvYFFH53aX79PhKNumRRz1GhVdmmMRk8Fl12dGO0aag8U3 HOFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ONNF7yjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si6921403ejc.353.2021.02.26.08.07.56; Fri, 26 Feb 2021 08:08:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ONNF7yjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbhBZQE6 (ORCPT + 99 others); Fri, 26 Feb 2021 11:04:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhBZQE4 (ORCPT ); Fri, 26 Feb 2021 11:04:56 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E015C061574; Fri, 26 Feb 2021 08:04:15 -0800 (PST) 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=nlrPN6RKsKi94KSjI+2dR6vaJd54WtU/wGcRKq1SGac=; b=ONNF7yjdRI1tRIpo0PQk8cAljg u3YfDpfRVp8NNTh+ucghqkv8ngoXtpV/axBTq+P3Js4/AgyZgZ+aekEOAxYXOgmJ79Hs1Dv9GhdgP lX3X4f0Fk5rpkhvUZD135Bxge8SpbXgAWybC2Mc3IKg3MN09I5BSb50Xa+8zU8k06Bq9FTNaxAdo+ 3yACY5ecnhSeenvfblbCjWFkZUpNoCN1FOipQcGGa0h3ERmwuB8zyX+2Ub/weelZ0uph9wN5CPbRO SBH78t+9xvcw1R03B/mfNcNRPENtIas77/vSrsXz649FAQPO+oDNpa6wrW/A0DObSZ2Hw+inIYCx9 /OSQsC6g==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lFfas-00CDLc-Ux; Fri, 26 Feb 2021 16:03:59 +0000 Date: Fri, 26 Feb 2021 16:03:54 +0000 From: Matthew Wilcox To: Jason Gunthorpe Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Freeing page tables through RCU Message-ID: <20210226160354.GE2723601@casper.infradead.org> References: <20210225205820.GC2858050@casper.infradead.org> <20210226144200.GV2643399@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226144200.GV2643399@ziepe.ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 10:42:00AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 25, 2021 at 08:58:20PM +0000, Matthew Wilcox wrote: > > > I'd like to hear better ideas than this. > > You didn't like my suggestion to put a sleepable lock around the > freeing of page tables during flushing? > > I still don't see how you convert the sleepable page walkers to use > rcu?? I don't want to convert the sleepable ones to use RCU ... I want to convert the non-sleeping ones to use RCU. A page_table_free_lock might work, but it might have its own problems later (eg a sleeping lock can't be acquired under RCU or spinlock, and it can't be a spinlock because it'd have to be held while we wait for IPIs). I think it would solve my immediate problem, and I wonder if it might solve some other problems ...