[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Scalability requirements for sysv ipc (was: ipc: store ipcs into IDRs)
Manfred Spraul wrote:
> Hi all,
> I noticed that sysv ipc now uses very special locking: first a global
> rw-semaphore, then within that semaphore rcu:
> > linux-2.6.25-rc3:/ipc/util.c:
>> struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id)
>> {
>> struct kern_ipc_perm *out;
>> int lid = ipcid_to_idx(id);
>> down_read(&ids->rw_mutex);
>> rcu_read_lock();
>> out = idr_find(&ids->ipcs_idr, lid);
> ids->rw_mutex is a per-namespace (i.e.: usually global) semaphore. Thus
> ipc_lock writes into a global cacheline. Everything else is based on
> per-object locking, especially sysv sem doesn't contain a single global
> lock/statistic counter/...
> That can't be the Right Thing (tm): Either there are cases where we need
> the scalability (then using IDRs is impossible), or the scalability is
> never needed (then the remaining parts from RCU should be removed).
> I don't have a suitable test setup, has anyone performed benchmarks
> recently?
> Is sysv semaphore still important, or have all apps moved to posix
> semaphores/futexes?
> Nadia: Do you have access to a suitable benchmark?
> A microbenchmark on a single-cpu system doesn't help much (except that
> 2.6.25 is around factor 2 slower for sysv msg ping-pong between two
> tasks compared to the numbers I remember from older kernels....)

If I remember well, at that time I had used ctxbench and I wrote some
other small scripts.
And the results I had were around 2 or 3% slowdown, but I have to
confirm that by checking in my archives.

I'll also have a look at the remaining RCU critical sections in the code.


 \ /
  Last update: 2008-03-21 13:49    [W:0.062 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site