mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kerolasa@gmail.com
Cc: Sami Kerola <kerolasa@iki.fi>, Al Viro <viro@zeniv.linux.org.uk>,
	Doug Ledford <dledford@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, Karel Zak <kzak@redhat.com>
Subject: Re: ipc: object information data in proc and sysfs
Date: Mon, 19 Nov 2012 16:12:50 -0800	[thread overview]
Message-ID: <20121119161250.ae0b25ff.akpm@linux-foundation.org> (raw)
In-Reply-To: <CAG27Bk1q5t590bvGg7Ka+2M-yWEMk_58sZsOxDKx-1XNn8mHww@mail.gmail.com>

On Sun, 18 Nov 2012 12:31:08 +0000
Sami Kerola <kerolasa@iki.fi> wrote:

> Hello,
> 
> While back I started to look how to get util-linux ipcs(1) tool to
> read values from /proc instead of using IPC multiplex functions.  Most
> of the data ipcs(1) is interested is available in /proc, but there are
> few exceptions, such as
> 
> msgctl q_qbytes
> semctl getval
> semctl sempid
> semctl semncnt
> semctl semzcnt
> 
> The simplest thing to do would be to add values in /proc/sysvipc/msg
> and /proc/sysvipc/sem as additional fields, but that does not seem
> right, as it would result to ABI change.
> 
> More effort requiring change would be to add information in new sysfs
> paths.  The IPC facilities are using id's which could be used as
> placeholder directories for the data needed.  Something like
> 
> /proc/sys/kernel/ipc/{m,s,q}/id/info
>                  ^^^^^^^^^^^^^^^^^^^
> 
> That sort of structure would allow future extensions IPC data without
> much pain.  I also assume that subdirectories could allow a little
> more precise controls, and perhaps some selected values might be made
> writable in future.  If nothing else at least expressing in sensible
> format semaphore lock wait queues could make debugging tools, such as
> lslocks(8), more useful.
> 
> I could give a try this change, but not without hearing the concept
> makes sense and could be considered part of upstream kernel (assuming
> my coding meets the usual quality criteria).
> 
> Any thoughts, comments, recommendations?

Where's the benefit in switching ipcs over to using /proc?

procfs reads are probably slower than the syscalls?

  reply	other threads:[~2012-11-20  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18 12:31 Sami Kerola
2012-11-20  0:12 ` Andrew Morton [this message]
2012-11-20 12:21   ` Karel Zak
2012-11-25 11:11     ` Sami Kerola

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=20121119161250.ae0b25ff.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dledford@redhat.com \
    --cc=kerolasa@gmail.com \
    --cc=kerolasa@iki.fi \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®