From: Christoph Hellwig <hch@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Hellwig <hch@infradead.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
liml@rtr.ca, jens.axboe@oracle.com
Subject: Re: [PATCH, RFC] xfs: batched discard support
Date: Wed, 19 Aug 2009 21:05:52 -0400 [thread overview]
Message-ID: <20090820010552.GA22107@infradead.org> (raw)
In-Reply-To: <20090819203916.GA25296@elte.hu>
On Wed, Aug 19, 2009 at 10:39:16PM +0200, Ingo Molnar wrote:
> A general interface design question: you added a new
> ioctl XFS_IOC_TRIM case. It's a sub-case of an
> ugly-looking demultiplexing xfs_file_ioctl().
ioctl is per defintion a multiplexer.
> What is your threshold for turning something into a
> syscall? When are ioctls acceptable in your opinion?
>
> I'm asking this because we are facing a similar problem
> with perfcounters: we need to extend the ioctl
> functionality there but introducing a new syscall looks
> wasteful.
>
> So i'm torn about the 'syscall versus ioctl' issue, i'd
> like to avoid making interface design mistakes and i'd
> like to solicit some opinions about this. I've attached
> the perfcounters ioctl patch below.
Only add a syscall if it has _one_ clear defined purpose,
which has kernel-wide meaning.
Do not add an syscall that is just another multiplexer without
structure. Most likely it will just be even worse than sys_ioctl.
Also really don't bother adding a system call that is specific to
one singler driver or filesystem. Besides horrible logistics -
you'd need some always built-in stub calling out to the possibly
modular drivers/filesystem - it also simply doesn't make any semantical
sense. I can't say I like the ioctl use in perfcounters much,
but adding a special syscalls instead would be even more horrible.
As for the trim support this really just was an RFC to start bringing
some code into play instead of the endless masturbation about hat code
that doesn't exist happens on hardware most people don't have. The
interface will most ceetainly change and I hope we will have a common
interface for all filesystems (or at least those that care).
next prev parent reply other threads:[~2009-08-20 1:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 0:47 [PATCH, RFC] xfs: batched discard support Christoph Hellwig
2009-08-16 1:35 ` Mark Lord
2009-08-16 2:19 ` Mark Lord
2009-08-16 2:25 ` Christoph Hellwig
2009-08-16 2:49 ` Mark Lord
2009-08-16 3:25 ` Mark Lord
2009-08-16 13:00 ` Mark Lord
2009-08-16 13:53 ` Christoph Hellwig
2009-08-16 13:59 ` Mark Lord
2009-08-16 14:06 ` Mark Lord
2009-08-16 14:23 ` Christoph Hellwig
2009-08-16 14:26 ` Mark Lord
2009-08-19 20:39 ` Ingo Molnar
2009-08-20 1:05 ` Christoph Hellwig [this message]
2009-08-20 1:10 ` Jamie Lokier
2009-08-20 1:38 ` Douglas Gilbert
2009-08-20 1:38 ` Mark Lord
2009-08-21 12:46 ` Ingo Molnar
2009-08-20 1:39 ` Mark Lord
2009-08-20 13:48 ` Ric Wheeler
2009-08-20 14:38 ` Mark Lord
2009-08-20 14:42 ` Ric Wheeler
2009-08-20 17:19 ` Greg Freemyer
2009-08-20 14:42 ` James Bottomley
2009-08-20 15:43 ` Rolf Eike Beer
2009-08-20 17:00 ` Ric Wheeler
2009-08-20 14:58 ` Douglas Gilbert
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=20090820010552.GA22107@infradead.org \
--to=hch@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=jens.axboe@oracle.com \
--cc=liml@rtr.ca \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=torvalds@linux-foundation.org \
--cc=xfs@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).