From: Jens Axboe <axboe@kernel.dk>
To: Zhu Yanjun <yanjun.zhu@linux.dev>,
Bart Van Assche <bvanassche@acm.org>,
Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"nbd@other.debian.org" <nbd@other.debian.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: blktests failures with v6.12-rc1 kernel
Date: Fri, 4 Oct 2024 19:41:07 -0600 [thread overview]
Message-ID: <c5c3c7d7-2db9-44fe-a316-b0b5bab30f1e@kernel.dk> (raw)
In-Reply-To: <b60fa0ab-591b-41e8-9fca-399b6a25b6d9@linux.dev>
On 10/4/24 7:26 PM, Zhu Yanjun wrote:
>
> ? 2024/10/5 0:31, Bart Van Assche ??:
>> On 10/4/24 5:40 AM, Zhu Yanjun wrote:
>>> So I add a jiffies (u64) value into the name.
>>
>> I don't think that embedding the value of the jiffies counter in the kmem cache names is sufficient to make cache names unique. That sounds like a fragile approach to me.
>
> Sorry. I can not get you. Why jiffies counter is not sufficient to
> make cache names unique? And why is it a fragile approach?
1 jiffy is an eternity, what happens if someone calls
kmem_cache_create() twice in that window?
> I read your latest commit. In your commit, the ida is used to make
> cache names unique. It is a good approach if it can fix this problem.
That seems over-engineered. Seems to me that either these things should
share a slab cache (why do they need one each, if they are the same
sized object?!). And if they really do need one, surely something ala:
static atomic_long_t slab_index;
sprintf(slab_name, "foo-%ld", atomic_inc_return(&slab_index));
would be all you need.
--
Jens Axboe
next prev parent reply other threads:[~2024-10-05 1:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 8:02 blktests failures with v6.12-rc1 kernel Shinichiro Kawasaki
2024-10-03 20:56 ` Bart Van Assche
2024-10-04 2:35 ` Zhu Yanjun
2024-10-04 2:40 ` Shinichiro Kawasaki
2024-10-04 12:40 ` Zhu Yanjun
2024-10-04 16:31 ` Bart Van Assche
2024-10-05 1:26 ` Zhu Yanjun
2024-10-05 1:41 ` Jens Axboe [this message]
2024-10-05 8:18 ` Zhu Yanjun
2024-10-05 21:36 ` Bart Van Assche
2024-10-05 21:45 ` Jens Axboe
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=c5c3c7d7-2db9-44fe-a316-b0b5bab30f1e@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nbd@other.debian.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=yanjun.zhu@linux.dev \
/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