Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3281091img; Mon, 25 Mar 2019 07:18:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVrbYPmOgVMsr/zPepzXyNXNWahsw4Wbs1JJIOxZzs+NDg+yacKlzspjNV90dCPNSNU18Q X-Received: by 2002:a17:902:9a01:: with SMTP id v1mr25666800plp.34.1553523497840; Mon, 25 Mar 2019 07:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553523497; cv=none; d=google.com; s=arc-20160816; b=T2EYmXjrFnyXqsrLMWGyKdS40TAY/XRuY1A8Q3eFRUZTkiAVKP6iu/OIKZe03t/vNS Xxu9yF0N3yTR77cfcFMu1SsWHSwP1z34F0n/dbWMl1V7ynVS1vcYJ/r52PZXzHDHeAWW mM+kN/GbDjNWa0X6cGgkQIcaaaY0ORAGDJbuHYzMS8apNJSByqmh55c8c0SLhm5rOujd 7mZCC0O9Sq0NOSO3RQUSBxLnejK2DykEteVdkSGeQyNQ/rIQDyzFL89GPYS/Jhi+R64k YfBPdCv57OCjPRA56Dm6SmnpK8ngx4HGi4y2GgXRHUU9W1q6qB+4gZA/xkk8UhuclTfT PCWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=CA8e9iJdjQQo48tujbYuWXXpvAZFfr86lTRrICmhX5U=; b=DGqn3qkGGNEXGcnMLpZjqEBTsOS+FGrN9IfbVIkFpP+WSVQDUvBJR59KIU8fPAuHZP N5SAbcXaE75aqSOSINEMq1fYSsC6LkMPCHjNkMYSO9BmcOWGXtH/FbXmpJoXw17JhA+I l5DCPedtE/f230B99lAp2W0y35Lpd3/pNnZ4Cecb+wD//zQRfb+FtsU7lUv9BYTyOdvz DzN6KqDDRp9uu08QurEmrGQquA8hrb3oKofIBLaXcf0JkCfbLNQIcNH80oNsRvwpNohk bwZu49IC+cvRTfA3PDy7l6WEa31+Adth64sQB57FhjI6Fk590pNo3Gy7RuuVM7zu/S5/ /WBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=HrFR8unf; 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 f20si402415pgj.278.2019.03.25.07.18.02; Mon, 25 Mar 2019 07:18:17 -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=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=HrFR8unf; 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 S1729036AbfCYOP1 (ORCPT + 99 others); Mon, 25 Mar 2019 10:15:27 -0400 Received: from a9-99.smtp-out.amazonses.com ([54.240.9.99]:36424 "EHLO a9-99.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbfCYOP0 (ORCPT ); Mon, 25 Mar 2019 10:15:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1553523325; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=QxVsvwno82TD/DL3wXtmz3tio2QUfM6l7WxY911mLLw=; b=HrFR8unfmFN4rnnt+Hqsx6IMNV5j6Ea/Am8KbVWjJx5WXZ9vC8pAxsdFJsEwsMr8 IX6ny3v5i4pWq6vZO83gg1U5J8ocP78jveoB25urbgWFuwz8X1ZrdUpqRv3x8XkjIK/ 3zFEhG+E6hEoqvnb3aAcjzbuqhphsuE+dCz+h7hU= Date: Mon, 25 Mar 2019 14:15:25 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox 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 In-Reply-To: <20190322195926.GB10344@bombadil.infradead.org> Message-ID: <01000169b534b9e8-31a2af2c-c396-47f9-8534-4cbd934ef09d-000000@email.amazonses.com> 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> <20190322195926.GB10344@bombadil.infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.03.25-54.240.9.99 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Mar 2019, Matthew Wilcox wrote: > 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. Well then we could either fix SLOB to conform to the others or add a kmem_cache_free_rcu() variant.