From: Alexander Shishkin <virtuoso@slind.org>
To: Greg KH <gregkh@suse.de>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <johnstul@us.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Jon Hunter <jon-hunter@ti.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
David Howells <dhowells@redhat.com>, Avi Kivity <avi@redhat.com>,
John Kacur <jkacur@redhat.com>,
Chris Friesen <chris.friesen@genband.com>,
Kay Sievers <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org,
Alexander Shishkin <virtuoso@slind.org>
Subject: Re: [PATCH] [RFCv2] notify userspace about time changes
Date: Fri, 20 Aug 2010 18:38:25 +0300 [thread overview]
Message-ID: <20100820153825.GG3003@shisha.kicks-ass.net> (raw)
In-Reply-To: <20100820153346.GA10830@suse.de>
On Fri, Aug 20, 2010 at 08:33:46 -0700, Greg KH wrote:
> On Fri, Aug 20, 2010 at 11:37:23AM +0300, Kirill A. Shutemov wrote:
> > On Thu, Aug 19, 2010 at 08:31:27AM -0700, Greg KH wrote:
> > > On Thu, Aug 19, 2010 at 11:36:12AM +0300, Kirill A. Shutemov wrote:
> > > > On Wed, Aug 18, 2010 at 09:09:37PM -0700, Greg KH wrote:
> > > > > On Wed, Aug 18, 2010 at 04:53:03PM -0700, Andrew Morton wrote:
> > > > > > Is sysfs the right interface for this thing? Bear in mind that
> > > > > > CONFIG_SYSFS does exist.
> > > > > >
> > > > > > > + fd = open("/sys/kernel/time_notify", O_WRONLY);
> > > > > > > + fdprintf(fd, "%d 1 0 1 1", efd);
> > > > > >
> > > > > > why not
> > > > > >
> > > > > > sys_time_notify(efd, 1, 0, 1, 1);
> > > > >
> > > > > Yeah, that would be much better than a sysfs file, this is abusing the
> > > > > sysfs interface quite a lot.
> > > >
> > > > Do you really think, that increasing number of syscalls is better then
> > > > fs-based interfaces?
> > >
> > > As you are pretty much creating a new syscall here anyway, there is no
> > > problem with making it a real one, right?
> >
> > I think Linux has too many syscalls. Significant part these interfaces
> > would be better to map to a filesystem[s].
>
> What is the difference between a syscall and a filesystem interface?
> They are both things that we can not change in the future and need to be
> preserved and documented.
>
> Don't be afraid of syscall's, they don't bite :)
>
> > > That way you can properly
> > > handle the user/kernel documentation and persistance over time (i.e. you
> > > can't change it.)
> >
> > On the other, hand properly designed fs-based interface requires less
> > modification of userspeace to use it. Acctually, you can use most of
> > fs-based intefaces directly from shell. No need in libc modifications and
> > utilities to use it from shell or other script language.
> > See cgroup, for example.
> >
> > > So yes, a syscall would be better, especially as this does not exactly
> > > fit into the model of sysfs, right?
> >
> > Yes, sysfs is not the best place for it, but...
>
> You just answered your own question. Please don't make it in sysfs,
> make it a syscall as it does not fit into sysfs.
Hmm, how about a syscallfs? :)
Regards,
--
Alex
next prev parent reply other threads:[~2010-08-20 15:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 13:55 [PATCH] [RFCv2] notify userspace about time changes Alexander Shishkin
2010-08-18 14:26 ` Greg KH
2010-08-18 22:57 ` Andrew Morton
2010-08-18 23:43 ` H. Peter Anvin
2010-08-18 23:53 ` Andrew Morton
2010-08-19 4:09 ` Greg KH
2010-08-19 4:39 ` Andrew Morton
2010-08-19 8:21 ` Alexander Shishkin
2010-08-19 8:36 ` Kirill A. Shutemov
2010-08-19 8:39 ` Kay Sievers
2010-08-19 15:31 ` Greg KH
2010-08-20 8:37 ` Kirill A. Shutemov
2010-08-20 15:33 ` Greg KH
2010-08-20 15:38 ` Alexander Shishkin [this message]
2010-08-19 9:50 ` Peter Zijlstra
2010-08-19 10:53 ` Kay Sievers
2010-08-19 11:14 ` Alexander Shishkin
2010-08-18 23:50 ` Chris Friesen
2010-08-18 23:09 ` john stultz
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=20100820153825.GG3003@shisha.kicks-ass.net \
--to=virtuoso@slind.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=chris.friesen@genband.com \
--cc=dhowells@redhat.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jkacur@redhat.com \
--cc=johnstul@us.ibm.com \
--cc=jon-hunter@ti.com \
--cc=kay.sievers@vrfy.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--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