Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp989855img; Fri, 22 Mar 2019 13:02:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKbUizYVYTJYJT9MHUEXy5bK/Opg35pZlNAOrBeJZ9Xnru46nsgr8wFz1f+72hj9dHgDr/ X-Received: by 2002:a17:902:848c:: with SMTP id c12mr11296627plo.207.1553284946767; Fri, 22 Mar 2019 13:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553284946; cv=none; d=google.com; s=arc-20160816; b=jIR9HC8/WfPTB+7mwqQYdpxjifHYoiLf4L3QvpyfBebgwE70x0n7pStKTjMOZ+gHpv +V6Xj03zQlgSzO+4uM+oFZhJU4GVI714yqtR60+4sA0dm8QKjzPSn2+FrlIUPvrXWJr5 AMJ+CrFpqbeLazfd+0glEqt/DsfT5ObJn3+BG/r2lC9JFA4jvrh6VMAHU4t8+i6OtXCa lnhZaKfzqK+InBofy742WhWjGFQxocYNOU32RAaFWZqPCOPWdw5IrLPixvHw7KlWPCsd wGpfAiF9MIlCnQZXW3uX2dclp6y/pfGPmON1bauYSyaSt374XttB6UX7SxwEG5vmqFpO dK0A== 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; bh=g9JaNDMvFMAM62vwNPQ5/TuvcMvCk3Ftabzyp8bNxns=; b=WtEnEM2A3b8m7/nkzMD5sCtZFHPfsdRyvLuwMpHjBcSbQ4+e+tnRI0PGJKTMju2Cth COAXMPhZIqQKFoQFbKE7WGvY673mtGj5dfEvLYCe3LEpe8EUrYezMqCyI7pMLlh3KH1a jEXfvw9ALpiyNnWbJBgdwJN/L5dgt5104oI+KJBYGBhju4nWoXxQamCWAhA/9FcaK9w8 RyIw2SBUoIwrwBZDX09kCXZHo3RPXmfTwORYPY9uPPH3R8UuTsIlaLz8VENgRdgEg/En NsLbZmxHRg+5tbbsvEHpbipSX+5gityb/CnEWxUAuXcvbKVzhh4eHywLQf+42DX+3GRX nIow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=C8EnG3Nn; 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 j71si7583095pfc.280.2019.03.22.13.02.08; Fri, 22 Mar 2019 13:02:26 -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=C8EnG3Nn; 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 S1727794AbfCVUAF (ORCPT + 99 others); Fri, 22 Mar 2019 16:00:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36316 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbfCVUAE (ORCPT ); Fri, 22 Mar 2019 16:00:04 -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=g9JaNDMvFMAM62vwNPQ5/TuvcMvCk3Ftabzyp8bNxns=; b=C8EnG3NnF9HDBrR9KjLd3Cgs3 qelf1PoSRZODZcqvXFU818UL1qu/MYwjZRO2SG4YJpU4Lt3au0J6lIFX7Vhnumuf7tjgGwc+2uPmj 5USHOk+FWSovAuXjVECU1KCiieD4ku3KdPJDWUrOYoKg+3qxyTgopM0zVfhHCG2lQ7jyOiutHW37+ 39n82yFF7h6rwyL+wVlFuxdoCZaP3gyMWSE3iCAhgFgnQ49l3yBEQTh3ph2lpPlQq16tMd6CCLAt7 63lQ+jeXbpsQJUtXJkfoNGmIAHWd9FfkWNWR35DARY48p9lrbjyD8zjCRJV1c9t0LTa+QEjZYUr+3 Kik8ykoSQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7QK6-0003HC-Uc; Fri, 22 Mar 2019 19:59:26 +0000 Date: Fri, 22 Mar 2019 12:59:26 -0700 From: Matthew Wilcox To: Christopher Lameter Cc: Waiman Long , Oleg Nesterov , Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, selinux@vger.kernel.org, Paul Moore , Stephen Smalley , Eric Paris , "Peter Zijlstra (Intel)" Subject: Re: [PATCH 2/4] signal: Make flush_sigqueue() use free_q to release memory Message-ID: <20190322195926.GB10344@bombadil.infradead.org> References: <20190321214512.11524-1-longman@redhat.com> <20190321214512.11524-3-longman@redhat.com> <20190322015208.GD19508@bombadil.infradead.org> <20190322111642.GA28876@redhat.com> <01000169a686689d-bc18fecd-95e1-4b3e-8cd5-dad1b1c570cc-000000@email.amazonses.com> <93523469-48b0-07c8-54fd-300678af3163@redhat.com> <01000169a6ea5e46-f845b8db-730b-436e-980c-3e4273ad2e34-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01000169a6ea5e46-f845b8db-730b-436e-980c-3e4273ad2e34-000000@email.amazonses.com> 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 Fri, Mar 22, 2019 at 07:39:31PM +0000, Christopher Lameter wrote: > On Fri, 22 Mar 2019, Waiman Long wrote: > > > > > > >> I am looking forward to it. > > > There is also alrady rcu being used in these paths. kfree_rcu() would not > > > be enough? It is an estalished mechanism that is mature and well > > > understood. > > > > > In this case, the memory objects are from kmem caches, so they can't > > freed using kfree_rcu(). > > Oh they can. kfree() can free memory from any slab cache. Only for SLAB and SLUB. SLOB requires that you pass a pointer to the slab cache; it has no way to look up the slab cache from the object.