Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941827AbcJSOVq (ORCPT ); Wed, 19 Oct 2016 10:21:46 -0400 Received: from verein.lst.de ([213.95.11.211]:41774 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941789AbcJSOVj (ORCPT ); Wed, 19 Oct 2016 10:21:39 -0400 Date: Wed, 19 Oct 2016 15:05:52 +0200 From: Christoph Hellwig To: Chris Wilson Cc: Christoph Hellwig , akpm@linux-foundation.org, joelaf@google.com, jszhang@marvell.com, joaodias@google.com, linux-mm@kvack.org, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski Subject: Re: [PATCH 2/6] mm: mark all calls into the vmalloc subsystem as potentially sleeping Message-ID: <20161019130552.GB5876@lst.de> References: <1476773771-11470-1-git-send-email-hch@lst.de> <1476773771-11470-3-git-send-email-hch@lst.de> <20161019111541.GQ29358@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161019111541.GQ29358@nuc-i3427.alporthouse.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 711 Lines: 15 On Wed, Oct 19, 2016 at 12:15:41PM +0100, Chris Wilson wrote: > On Tue, Oct 18, 2016 at 08:56:07AM +0200, Christoph Hellwig wrote: > > This is how everyone seems to already use them, but let's make that > > explicit. > > Ah, found an exception, vmapped stacks: Oh, fun. So if we can't require vfree to be called from process context we also can't use a mutex to wait for the vmap flushing. Given that we free stacks from the scheduler context switch I also fear there is no good way to get a sleepable context there. The only other idea I had was to use vmap_area_lock for the protection that purge_lock currently provides, but that would require some serious refactoring to avoid recursive locking first.