From: Manfred Spraul <manfred@colorfullife.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
1vier1@web.de
Subject: Re: [PATCH 0/1] ipc/util.{c,h}: Use binary search for max_idx
Date: Sun, 25 Apr 2021 20:19:51 +0200 [thread overview]
Message-ID: <3b503caa-2f2e-3b9a-e513-342509b668c2@colorfullife.com> (raw)
In-Reply-To: <20210425180729.7ew42ab5ygstbwm4@offworld>
Hi Davidlohr,
On 4/25/21 8:07 PM, Davidlohr Bueso wrote:
> On Sun, 25 Apr 2021, Manfred Spraul wrote:
>
>> 2nd version of the patch:
>> @Andrew: Could you add the patch to your mm tree, as candidate for
>> linux-next?
>>
>> Note:
>> I have tried to remove the ids->max_idx cache entirely. Unfortunately,
>> this causes a significant slow-down of semstat(,,IPC_STAT):
>> * no object allocated, no ipcmni_extended: +50%
>> * no object allocated, with ipcmni_extended: +80%
>> * 30 objects allocated, with large gaps, no ipcmni_extended:
>> +350%
>> Thus I haven't removed ids->max_id.
>
> Right, IPC_STAT is the main usecase for max_id. But I'm not sure why
> you were looking to remove it in the first place - or was it just to
> avoid this patch altogether?
>
I had assumed that after removing the linear search, the lookup would be
so fast that the cache can be removed entirely.
It would save ~20 lines of code and one int in struct ipc_ids (12 bytes
per namespace?).
But: My assumption was wrong, the slowdown is too large.
--
Manfred
prev parent reply other threads:[~2021-04-25 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 7:52 Manfred Spraul
2021-04-25 7:52 ` [PATCH] ipc/util.c: " Manfred Spraul
2021-04-25 18:07 ` [PATCH 0/1] ipc/util.{c,h}: " Davidlohr Bueso
2021-04-25 18:19 ` Manfred Spraul [this message]
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=3b503caa-2f2e-3b9a-e513-342509b668c2@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=1vier1@web.de \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
/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®