Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4414477ybx; Sat, 9 Nov 2019 15:17:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyvcERdavi2G5xBvhqTIaA2cSqarB2NBPF54554fIM4wJnMw2H+Y5mHs9BcEKARZgpLBRYn X-Received: by 2002:a17:906:8591:: with SMTP id v17mr15883905ejx.185.1573341454427; Sat, 09 Nov 2019 15:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573341454; cv=none; d=google.com; s=arc-20160816; b=NMszSrE7XEK2ub7g9TnFbIUiMmT+zYbo/mdQlmZgkgzMz0vKQWZQWo7tCQNS0BQX+N 7IIOQeKhtiJWiteJnw8zQB+LyeufqVAkMI8EnoaqKY7WM1C/fuNf8lmaxRwe2QkWOsVk uKewq2PPz45Esy/5sNaC9py9mDsvmUgonkCR7J7jx+Q+Z3GoW+dRKaqNjpzSNKqgQCPC ynGrzAKMm6efKhQ1SOVTUujGP7t4xtqw5QcENL5trOyb49g9ELee5qhDxqGl8lKVoanT 2h1Xj8/pGostjKotMFSc0JTpG7+LZQPoDE/t2CfFHT5GvweLbOrge32pJ6ycZZq5lVcA o2NA== 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=ZEcx0eylhE2cjJSPf6erQ/WYSbOM/tcEV/JhKcz5LuI=; b=l/s3TVX453C+NF8ajcJH1Ecip9EBHmWHwgcUURNe6ogDTdQgIgnPllyfl9zZoGo9oT Sd1CfDiA3bHGIoZ54vIWg4Tg+mqLNqQLVE0GRP8rEFkdPKgaw5tT9WHlT5cPL1imbYjB xA6iNTPttDAzEf478XgmR+qDByfE+l89Cr38qZdFKB4rJgLGlZjl8EuHj1OehtKk28Jz H5XukaNqNPSjxU8hKNAG9FjHa8LYTY1rKHxPvsDeEq/4KWDKbgkoSzJZDRHKt1xVSNmK VCUxt/Lkj0stFvenO6EFRXKJ8KxvTxdaaV8ST/+SiUMoybXk048cqSiAC4whfrsPoMQG iNVQ== 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 b15si7677243eda.174.2019.11.09.15.17.11; Sat, 09 Nov 2019 15:17:34 -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 S1726565AbfKIXQa (ORCPT + 99 others); Sat, 9 Nov 2019 18:16:30 -0500 Received: from gentwo.org ([3.19.106.255]:39124 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfKIXQ3 (ORCPT ); Sat, 9 Nov 2019 18:16:29 -0500 Received: by gentwo.org (Postfix, from userid 1002) id F39EA3EC14; Sat, 9 Nov 2019 23:16:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id F15353E886; Sat, 9 Nov 2019 23:16:28 +0000 (UTC) Date: Sat, 9 Nov 2019 23:16:28 +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: <20191109230147.GA75074@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> 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 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. The allocation does not hurt and CONFIG_SLUB_DEBUG is on in most configurations.