From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/6] debugobjects: Don't start fill if there are remaining nodes locally
Date: Mon, 9 Sep 2024 19:03:33 +0800 [thread overview]
Message-ID: <cf687aec-f8fe-c032-e22b-6572edc529a3@huawei.com> (raw)
In-Reply-To: <87ed5tchc6.ffs@tglx>
On 2024/9/9 17:22, Thomas Gleixner wrote:
> On Thu, Sep 05 2024 at 11:45, Leizhen wrote:
>> On 2024/9/5 11:11, Leizhen (ThunderTown) wrote:
>> Seems to need to add an additional patch as follows to be foolproof.
>> I'll prepare it.
>>
>> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
>> index e175cc74f7b7899..d3f8cc7dc1c9291 100644
>> --- a/lib/debugobjects.c
>> +++ b/lib/debugobjects.c
>> @@ -245,6 +245,21 @@ alloc_object(void *addr, struct debug_bucket *b, const struct debug_obj_descr *d
>>
>> raw_spin_lock(&pool_lock);
>> obj = __alloc_object(&obj_pool);
>> + if (!obj) {
>> + raw_spin_unlock(&pool_lock);
>> + obj = kmem_cache_zalloc(obj_cache, __GFP_HIGH | GFP_NOWAIT);
>> + if (!obj)
>> + return NULL;
>> +
>> + raw_spin_lock(&pool_lock);
>> + debug_objects_allocated++;
>> +
>> + /*
>> + * It can be understood that obj is allocated immediately after
>> + * being added to obj_pool.
>> + */
>> + obj_pool_used++;
>> + }
>> if (obj) {
>> int cnt = 0;
>
> No. That fails on RT. See debug_object_fill_pool().
OK, I got it, thanks.
>
> Thanks,
>
> tglx
> .
>
--
Regards,
Zhen Lei
next prev parent reply other threads:[~2024-09-09 11:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 13:39 [PATCH v2 0/6] debugobjects: Do some minor optimizations, fixes and cleaups Zhen Lei
2024-09-04 13:39 ` [PATCH v2 1/6] debugobjects: Fix the compilation attributes of some global variables Zhen Lei
2024-09-09 14:59 ` [tip: core/debugobjects] " tip-bot2 for Zhen Lei
2024-09-04 13:39 ` [PATCH v2 2/6] debugobjects: Fix the misuse of global variables in fill_pool() Zhen Lei
2024-09-09 14:59 ` [tip: core/debugobjects] debugobjects: Fix conditions " tip-bot2 for Zhen Lei
2024-09-04 13:39 ` [PATCH v2 3/6] debugobjects: Remove redundant checks " Zhen Lei
2024-09-09 14:59 ` [tip: core/debugobjects] " tip-bot2 for Zhen Lei
2024-09-04 13:39 ` [PATCH v2 4/6] debugobjects: Don't start fill if there are remaining nodes locally Zhen Lei
2024-09-05 3:11 ` Leizhen (ThunderTown)
2024-09-05 3:45 ` Leizhen (ThunderTown)
2024-09-05 7:04 ` Leizhen (ThunderTown)
2024-09-09 9:22 ` Thomas Gleixner
2024-09-09 11:03 ` Leizhen (ThunderTown) [this message]
2024-09-09 12:10 ` Thomas Gleixner
2024-09-09 13:51 ` Leizhen (ThunderTown)
2024-09-09 14:35 ` Thomas Gleixner
2024-09-09 14:41 ` Thomas Gleixner
2024-09-10 6:13 ` Leizhen (ThunderTown)
2024-09-10 15:29 ` Leizhen (ThunderTown)
2024-09-11 1:21 ` Leizhen (ThunderTown)
2024-09-04 13:39 ` [PATCH v2 5/6] debugobjects: Use hlist_splice_init() to reduce lock conflicts Zhen Lei
2024-09-04 13:39 ` [PATCH v2 6/6] debugobjects: Delete a piece of redundant code Zhen Lei
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=cf687aec-f8fe-c032-e22b-6572edc529a3@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®