Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6348317ybx; Mon, 11 Nov 2019 07:48:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyZ5AsvlMJMde6n7eeDNaZqoW6u5LxiTjIscnEC7e5iYIcFQVMnyYlTDkfEqDWqcqjyR4q9 X-Received: by 2002:aa7:df87:: with SMTP id b7mr26674650edy.296.1573487284222; Mon, 11 Nov 2019 07:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573487284; cv=none; d=google.com; s=arc-20160816; b=MP6Ubn9yKNKNfNOxf3PG+65kPpiIXNEgfGNE4vstd4RnDpiD9IxijysdETA7ajATfv EJC+PWKYosKR/sTPad0enZ/3wUYajisg9I+uZw9rneIDTipkz8YSs4x8hhcuQU1vjkFu +S3u1a9L0rh6mut7lgf0iwN7oSUfuRJjmA3uKt04i5KLewNjbQQu1CmH3coH82wXi0N7 X9et4Qs54ZKyHlSvXX4/wVzxQthxINFTnvBgNtyPKIrP/LA8XmyyGtH3Wv1zzcB+qncF aI5DqCfZzqWw+0BB0qWqVTpHguCE6OVGSZ5gQ4cdz5dMLtvetpeBLPC+AVKeykEuANAj GEFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=j8iPYQrBtga4W23Cv+Rf/3mXGhx575r6mvmkLEr8bK4=; b=gCKVLSOSImzLpoz1/WW97Upt43hN7+Aj6NZshY/2YhAUT3CnjZMGA+z2BztiqdxUUT 9nTqbUVTDtHzOyAVDKp1qTaHW3HQBeo7xnOAc8+LPxj0Rqg4yNEwDgjXC8KQe0LmVhBI hdcv5iYlZCeV2WUI2UMrXRjBZdE0+WMSrLtVzzWfCxbN6cAveEr9CEE1CPOttzv3raq0 d0bW/5jJPWDoFrqmEmdJA1HuGy6RTtiopNczzNMA2iNyNAjIDKkl0GvKUAQPBhY/QlYN D4itiJ+BtbmfP5e21xdvJugfTfxcN3Fa0dWBCxSHtFpt2GQ9LVjeoK8JQLvGsyBt5vv9 wIwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g27si10056737ejc.219.2019.11.11.07.47.40; Mon, 11 Nov 2019 07:48:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbfKKPrF (ORCPT + 99 others); Mon, 11 Nov 2019 10:47:05 -0500 Received: from gentwo.org ([3.19.106.255]:39186 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfKKPrE (ORCPT ); Mon, 11 Nov 2019 10:47:04 -0500 Received: by gentwo.org (Postfix, from userid 1002) id B85DF3EC1E; Mon, 11 Nov 2019 15:47:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id B71FA3EC1D; Mon, 11 Nov 2019 15:47:03 +0000 (UTC) Date: Mon, 11 Nov 2019 15:47:03 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Yu Zhao cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "Kirill A . Shutemov" , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A . Shutemov" Subject: Re: [PATCH v4 2/2] mm: avoid slub allocation while holding list_lock In-Reply-To: <20191110184721.GA171640@google.com> Message-ID: References: <20190914000743.182739-1-yuzhao@google.com> <20191108193958.205102-1-yuzhao@google.com> <20191108193958.205102-2-yuzhao@google.com> <20191109230147.GA75074@google.com> <20191110184721.GA171640@google.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 10 Nov 2019, Yu Zhao wrote: > On Sat, Nov 09, 2019 at 11:16:28PM +0000, Christopher Lameter wrote: > > On Sat, 9 Nov 2019, Yu Zhao wrote: > > > > > > struct page *page, *h; > > > > + unsigned long *map = bitmap_alloc(oo_objects(s->max), GFP_KERNEL); > > > > + > > > > + if (!map) > > > > + return; > > > > > > What would happen if we are trying to allocate from the slab that is > > > being shut down? And shouldn't the allocation be conditional (i.e., > > > only when CONFIG_SLUB_DEBUG=y)? > > > > Kmalloc slabs are never shut down. > > Maybe I'm not thinking straight -- isn't it what caused the deadlock in > the first place? Well if kmalloc allocations become a problem then we have numerous issues all over the kernel to fix. > Kmalloc slabs can be shut down when memcg is on. Kmalloc needs to work even during shutdown of a memcg. Maybe we need to fix memcg to not allocate from the current memcg during shutdown?