Received: by 10.213.65.68 with SMTP id h4csp4205068imn; Tue, 10 Apr 2018 10:54:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx48hzJ/XcWtTzED9ISw2dPEa9eloUk9pl+w0cJE7TBHoQX9zmLCvSKNMgHUnQN93aOhvUnll X-Received: by 10.99.173.7 with SMTP id g7mr1000103pgf.170.1523382852501; Tue, 10 Apr 2018 10:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523382852; cv=none; d=google.com; s=arc-20160816; b=AN3s5mXsL8sk0VPhk0NLppF5ySfohwN/v0cOawSnOpTxvn/D9azWpYiMkZp4b3onBr 1hHcNIcCt6S0KZyEj2XzdJ2JxyLis4G6iNy5fBXr/X0J+JiUfvROvpMqpwMPWNMBs0Dx nEaKuEWEnSP0v0h8vBTGiGML+iZfVpcKYT6dbEqQlN3NCEdE8DTDVsVBDi2lTBE5H9jQ Oju6f0kDcFtOOZRaUZ2mxJS9UoWkdH3XTO4eutABwJeopsP92n4Lpg0dPbVicUsVgTzA OsvQxXJfOfh6yYWEC9O7vPzym/0zlNxN83rCIUP56zcEjHRQSsmDWG+EQxjkd2BnTzEt zQng== 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=NUNO9Otb8hTTOGCRIST+KcbjG1LhiRJ0GxSg3C2vGh8=; b=OprDpxCa6f90IrQJNTYwz+pr8OrxicDgL23/QHJAVaMEleNPfc0iFmsglakmpr5BAG DMKENnVWqMcHOsAKAitvNPrmKI3uvmGJr54BBccT1iAUDp3Pi6DtkEs0GJVAZ5k1QfgL 6CiHcm5uPUKTNMnsZbbEyTHTcGwYX1NQi/O9fmqbXMBgmPKvrcF5BlLqD/Nx8AlIvJAl NKxijaTZyo1/2bEgsUGcTSGN37K/cP2eVOwaBvv2w/TDNmuXRUbJBfHBG5r5U757kzbO 60lI+xnbtIBXF0ZQrgxPeGemlrredzhb8i50ZQC8/KrRjI2Hf+Z0QD+pxk9POki2yRlI 1Wdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uBBc/TlQ; 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 y1-v6si3137082pli.586.2018.04.10.10.53.27; Tue, 10 Apr 2018 10:54:12 -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=uBBc/TlQ; 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 S1752163AbeDJRuU (ORCPT + 99 others); Tue, 10 Apr 2018 13:50:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57550 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751876AbeDJRuT (ORCPT ); Tue, 10 Apr 2018 13:50:19 -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=NUNO9Otb8hTTOGCRIST+KcbjG1LhiRJ0GxSg3C2vGh8=; b=uBBc/TlQtt+kNvESR1rjaVixm b+YsCLmp7ZTwg4ibJ84K20sOVRse5IfHa0ISmBsoY8D6Obn7BLNlsbXfVgz8ZsHMytUixgr9cHNCB QBrVWjOapK9fuIF7Hifz0g4DSHJl+he9gwx1GeeE0Kv+lQkRcVU4KFpXwQNac8gTRYWxN6mmWdG+D vNkQOefPQ2BeW71BZ/PHEbL0ht8Qtny1+4nlT7BZRIuwtWc9E9igv2hpjF5QPP1Qxpw6CI1JR2p4l U859KYClqp15kraDKkc9JDXby0ixTP751SmB5lBOdOiUWMcDTnYKhPL51lujeY0vgP5lbLSns5N7j yXY+CZ5eg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5xPI-0000RJ-6A; Tue, 10 Apr 2018 17:50:12 +0000 Date: Tue, 10 Apr 2018 10:50:12 -0700 From: Matthew Wilcox To: Christopher Lameter Cc: Eric Dumazet , 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 , stable@vger.kernel.org Subject: Re: [PATCH 1/2] slab: __GFP_ZERO is incompatible with a constructor Message-ID: <20180410175011.GE3614@bombadil.infradead.org> References: <20180410125351.15837-1-willy@infradead.org> <20180410165054.GC3614@bombadil.infradead.org> <20180410173841.GD3614@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 Tue, Apr 10, 2018 at 12:45:56PM -0500, Christopher Lameter wrote: > On Tue, 10 Apr 2018, Matthew Wilcox wrote: > > > > How do you envision dealing with the SLAB_TYPESAFE_BY_RCU slab caches? > > > Those must have a defined state of the objects at all times and a constructor is > > > required for that. And their use of RCU is required for numerous lockless > > > lookup algorithms in the kernhel. > > > > Not at all times. Only once they've been used. Re-constructing them > > once they've been used might break the rcu typesafety, I suppose ... > > would need to examine the callers. > > Objects can be freed and reused and still be accessed from code that > thinks the object is the old and not the new object.... Yes, I know, that's the point of RCU typesafety. My point is that an object *which has never been used* can't be accessed. So you don't *need* a constructor.