[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJWu+oric2eq1WOrx9fKHxiMhyq490av-1TbRPDfTptOydfM+A@mail.gmail.com>
Date: Thu, 20 Oct 2016 17:32:19 -0700
From: Joel Fernandes <joelaf@...gle.com>
To: Christoph Hellwig <hch@....de>
Cc: Andy Lutomirski <luto@...capital.net>,
Chris Wilson <chris@...is-wilson.co.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Jisheng Zhang <jszhang@...vell.com>,
John Dias <joaodias@...gle.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
linux-rt-users@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/6] mm: mark all calls into the vmalloc subsystem as
potentially sleeping
Hi Christoph,
On Wed, Oct 19, 2016 at 9:31 AM, Christoph Hellwig <hch@....de> wrote:
> On Wed, Oct 19, 2016 at 08:34:40AM -0700, Andy Lutomirski wrote:
>>
>> It would be quite awkward for a task stack to get freed from a
>> sleepable context, because the obvious sleepable context is the task
>> itself, and it still needs its stack. This was true even in the old
>> regime when task stacks were freed from RCU context.
>>
>> But vfree has a magic automatic deferral mechanism. Couldn't you make
>> the non-deferred case might_sleep()?
>
> But it's only magic from interrupt context..
>
> Chris, does this patch make virtually mapped stack work for you again?
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index f2481cb..942e02d 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -1533,7 +1533,7 @@ void vfree(const void *addr)
>
> if (!addr)
> return;
> - if (unlikely(in_interrupt())) {
> + if (in_interrupt() || in_atomic()) {
in_atomic() also checks in_interrupt() cases so only in_atomic() should suffice.
Thanks,
Joel
Powered by blists - more mailing lists