From: Matthew Wilcox <willy@infradead.org>
To: rao.shoaib@oracle.com
Cc: linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com,
joe@perches.com, brouer@redhat.com, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface
Date: Tue, 3 Apr 2018 13:58:22 -0700 [thread overview]
Message-ID: <20180403205822.GB30145@bombadil.infradead.org> (raw)
In-Reply-To: <1522776173-7190-3-git-send-email-rao.shoaib@oracle.com>
On Tue, Apr 03, 2018 at 10:22:53AM -0700, rao.shoaib@oracle.com wrote:
> +++ b/mm/slab.h
> @@ -80,6 +80,29 @@ extern const struct kmalloc_info_struct {
> unsigned long size;
> } kmalloc_info[];
>
> +#define RCU_MAX_ACCUMULATE_SIZE 25
> +
> +struct rcu_bulk_free_container {
> + struct rcu_head rbfc_rcu;
> + int rbfc_entries;
> + void *rbfc_data[RCU_MAX_ACCUMULATE_SIZE];
> + struct rcu_bulk_free *rbfc_rbf;
> +};
> +
> +struct rcu_bulk_free {
> + struct rcu_head rbf_rcu; /* used to schedule monitor process */
> + spinlock_t rbf_lock;
> + struct rcu_bulk_free_container *rbf_container;
> + struct rcu_bulk_free_container *rbf_cached_container;
> + struct rcu_head *rbf_list_head;
> + int rbf_list_size;
> + int rbf_cpu;
> + int rbf_empty;
> + int rbf_polled;
> + bool rbf_init;
> + bool rbf_monitor;
> +};
I think you might be better off with an IDR. The IDR can always
contain one entry, so there's no need for this 'rbf_list_head' or
__rcu_bulk_schedule_list. The IDR contains its first 64 entries in
an array (if that array can be allocated), so it's compatible with the
kfree_bulk() interface.
next prev parent reply other threads:[~2018-04-03 20:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 17:22 [PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk rao.shoaib
2018-04-03 17:22 ` [PATCH 1/2] Move kfree_call_rcu() to slab_common.c rao.shoaib
2018-04-03 17:22 ` [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface rao.shoaib
2018-04-03 20:58 ` Matthew Wilcox [this message]
2018-04-04 0:55 ` Rao Shoaib
2018-04-04 2:23 ` Matthew Wilcox
2018-04-04 7:16 ` Rao Shoaib
2018-04-04 8:39 ` Rao Shoaib
-- strict thread matches above, loose matches on Subject: below --
2018-04-02 5:31 [PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk rao.shoaib
2018-04-02 5:31 ` [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface rao.shoaib
2018-04-02 7:13 ` kbuild test robot
2018-04-02 17:20 ` Christopher Lameter
2018-04-04 7:28 ` Rao Shoaib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180403205822.GB30145@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=brouer@redhat.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rao.shoaib@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).