Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965019AbcJVPRl (ORCPT ); Sat, 22 Oct 2016 11:17:41 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:38151 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964916AbcJVPRg (ORCPT ); Sat, 22 Oct 2016 11:17:36 -0400 From: Christoph Hellwig To: akpm@linux-foundation.org Cc: joelaf@google.com, jszhang@marvell.com, chris@chris-wilson.co.uk, joaodias@google.com, linux-mm@kvack.org, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] mm: defer vmalloc from atomic context Date: Sat, 22 Oct 2016 17:17:17 +0200 Message-Id: <1477149440-12478-5-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1477149440-12478-1-git-send-email-hch@lst.de> References: <1477149440-12478-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 713 Lines: 24 We want to be able to use a sleeping lock for freeing vmap to keep latency down. For this we need to use the deferred vfree mechanisms no only from interrupt, but from any atomic context. Signed-off-by: Christoph Hellwig --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a4e2cec..bcc1a64 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1509,7 +1509,7 @@ void vfree(const void *addr) if (!addr) return; - if (unlikely(in_interrupt())) { + if (unlikely(in_atomic())) { struct vfree_deferred *p = this_cpu_ptr(&vfree_deferred); if (llist_add((struct llist_node *)addr, &p->list)) schedule_work(&p->wq); -- 2.1.4