On Sun, 25 Apr 2021, Manfred Spraul wrote:I had assumed that after removing the linear search, the lookup would be so fast that the cache can be removed entirely.
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?