Received: by 10.192.165.156 with SMTP id m28csp2029671imm; Thu, 12 Apr 2018 07:31:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx48dEPNG/5aHnwTmNYzIEZHI+Oln7RimLmd0J1MWRgUeka01+5Q42H+CN8yNFqvWiokBumMt X-Received: by 2002:a17:902:698f:: with SMTP id l15-v6mr1336122plk.160.1523543463505; Thu, 12 Apr 2018 07:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523543463; cv=none; d=google.com; s=arc-20160816; b=CxtgQ0cP/Fa8+EPDW1Qmq6NWeWiO52xmgt+Td7jVBXYZr89r1h/2PDDBsavEQzSCjt CbrSzDVl0ZZJhnmkFnpvCtjfMqLUr4NuNMrKmKCzOG97Tbg+grmq9jEuEVmgUMDcPXRG uf5tp5rV3jYewcSKQIj9ZQ5UEZ2g6sSOo85MVsOJyiY4D+5iaJNsNuRlsk2k7jfHLibW 6ajrOtLq8WP29UNErPbLbPvwgnwLIGJyU7U7VUSYPHuUoJKqgoe7q8BBb3kMxQEC+mnc 0ou9eke8uFZDkMDpCG87naNvFu5XHDaRMW5DqEoxeXL4Jx0kapPYqLATFYv/F6JymYDR 3ZWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=XNGsYdJ4dpJYy5uwXkVZScXa+Tkr8oerbNvS/Apr9Zo=; b=V85L10Bv6eDvtnpeSUegaQZTH2hUQT7UI33e45+Px3USvrfAEjQNjL6XcuI+dmiRJL FmWrAGYgoin+DVTCifxsAkAwii0LBVvxsb8Udyyr6pdV6L/RN3VWH9rI7vdIIxOM+EpS lmEYSd8hMwpcvZze1P6rOhgJMWcjKc5nMdxXkiKDo0gJ7LfiIoybQrnAVxp7gNdoEcZK paeZ39N9JigcNjoZsaCRaBNulnLW27ad2l5uQtm/JAlRLbKrXKwlFZEtjBUNFTifuWe+ 90DxU9Cb4H8CsyhIqwvpes0NPE7msMrTEo6HDb0eEytrb/GtCqBvM1bVy63B+rcpksGo /fEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jOlLraqI; 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 k70si2378510pgc.622.2018.04.12.07.30.26; Thu, 12 Apr 2018 07:31:03 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jOlLraqI; 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 S1753114AbeDLO10 (ORCPT + 99 others); Thu, 12 Apr 2018 10:27:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40336 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753083AbeDLO1W (ORCPT ); Thu, 12 Apr 2018 10:27:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XNGsYdJ4dpJYy5uwXkVZScXa+Tkr8oerbNvS/Apr9Zo=; b=jOlLraqI/5dIZHFOZJG3/5Yfb wpmiDU5/1VKTyD+w0+aseJ9wWWZxlcORHJUbm7qFanmZ2HFuHfpQjmSz/DSpCdHMOZAaiWdhovFJb yrOSOPPC+sB92KW+TmDPdYpefx5b1CIojZ3l78Un187vclSAyeU0VGcGiywEaYtM/5a9QviExPx4E HWjwJAqXL8qsjtNVpe3pX7Yg41kGnyu9RMHON6B1XCfTA9TZ5Prd4AWKBZvC5/KIs31Xvg41hgzDh L7ugBh4K20dGxfSCIiBpsl53tlaqg40XRSC1fN94irc3aMAI2knGzkQgxFPuB4ba9dd2zA6svM5aW LTK4B3UFQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6dC2-0007Qu-SG; Thu, 12 Apr 2018 14:27:18 +0000 Date: Thu, 12 Apr 2018 07:27:18 -0700 From: Matthew Wilcox To: Christopher Lameter Cc: linux-mm@kvack.org, Matthew Wilcox , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, Jan Kara , Jeff Layton , Mel Gorman Subject: Re: [PATCH v2 2/2] slab: __GFP_ZERO is incompatible with a constructor Message-ID: <20180412142718.GA20398@bombadil.infradead.org> References: <20180411060320.14458-1-willy@infradead.org> <20180411060320.14458-3-willy@infradead.org> <20180411192448.GD22494@bombadil.infradead.org> <20180411235652.GA28279@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 09:10:23AM -0500, Christopher Lameter wrote: > On Wed, 11 Apr 2018, Matthew Wilcox wrote: > > I don't see how that works ... can you explain a little more? > > c->freelist is NULL and thus ___slab_alloc (slowpath) is called. > ___slab_alloc populates c->freelist and gets the new object pointer. > > if debugging is on then c->freelist is set to NULL at the end of > ___slab_alloc because deactivate_slab() is called. > > Thus the next invocation of the fastpath will find that c->freelist is > NULL and go to the slowpath. ... _ah_. I hadn't figured out that c->page was always NULL in the debugging case too, so ___slab_alloc() always hits the 'new_slab' case. Thanks!