From: Tejun Heo <tj@kernel.org>
To: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@zabbo.net>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
tytso@google.com, Dave Kleikamp <dave.kleikamp@oracle.com>,
Dmitry Monakhov <dmonakhov@openvz.org>,
"Maxim V. Patlasov" <mpatlasov@parallels.com>,
michael.mesnier@intel.com, jeffrey.d.skirvin@intel.com,
Martin Petersen <martin.petersen@oracle.com>
Subject: Re: [RFC, PATCH] Extensible AIO interface
Date: Wed, 3 Oct 2012 10:41:06 +0900 [thread overview]
Message-ID: <20121003014106.GC15806@localhost> (raw)
In-Reply-To: <20121002214113.GV26488@google.com>
Hello, Kent.
On Tue, Oct 02, 2012 at 02:41:13PM -0700, Kent Overstreet wrote:
> Seems to me it'd be no different from security considerations when
> introducing new ioctls. I.e., messy, ad hoc, easy to get wrong, but
> sometimes no way around it.
>
> It really has to be ad hoc if it's extensible, unfortunately.
>
> The only way of getting around _that_ would be with some kind of
> reflective type system, so that generic code could parse (in some
> fashion) the types of the various attributes, and for pointers copy the
> user data into the kernel and do whatever access controls in generic
> code.
I'm not userland API expert by any stretch of imagination but the
basic mechanism to pass data around seems sane to me and aio as stinky
as it is seems to be the only logical stuff for IOs w/ extra
attributes although alignment is always painful with any form of
concatenated opaque structures.
However, I don't think it's a good idea to try to implement something
which is a neutral transport of opaque data between userland and lower
layers. Things like that sound attractive with unlimited
possibilities but reality seems to have the tendancy to make a big
mess out of setups like that.
So, if we're gonna do this, let's define what attributes we want to
have and let them be processed at the interface layer and fed to lower
layers afterwards - e.g. for cgroup context association, associate the
resulting bios with the target cgroup from the aio layer.
I'm quite skeptical of general usefulness of having opaque knobs to
lower IO stack which don't have proper generic abstraction. Nobody
can make proper use of things like that. Well, not nobody, maybe if
the lower stack, the interface and the application are implemented by
a single organization over relatively short span of time, maybe it
would be useful for them, but that isn't something which generic
interface design should focus on.
It's okay to allow some side channel thing for specific hacky uses but
I really hope the general design were focused around properly
abstracted attributes which can be understood and handled by the upper
layer.
Thanks.
--
tejun
next prev parent reply other threads:[~2012-10-03 1:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-01 22:23 [RFC, PATCH] Extensible AIO interface Kent Overstreet
2012-10-01 23:12 ` Zach Brown
2012-10-01 23:22 ` Kent Overstreet
2012-10-01 23:44 ` Zach Brown
2012-10-02 0:22 ` Kent Overstreet
2012-10-02 17:43 ` Zach Brown
2012-10-02 21:41 ` Kent Overstreet
2012-10-03 1:41 ` Tejun Heo [this message]
2012-10-03 3:00 ` Kent Overstreet
2012-10-03 21:58 ` Tejun Heo
2012-10-04 19:50 ` Kent Overstreet
2012-10-02 0:47 ` Kent Overstreet
2012-10-02 22:34 ` Martin K. Petersen
2012-10-02 17:41 ` Jeff Moyer
2012-10-03 0:20 ` Kent Overstreet
2012-10-03 1:28 ` Dave Chinner
2012-10-03 2:41 ` Kent Overstreet
2012-10-04 1:04 ` Dave Chinner
2012-10-03 19:15 ` Jeff Moyer
2012-10-04 19:37 ` Kent Overstreet
2012-10-02 19:34 ` Andi Kleen
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=20121003014106.GC15806@localhost \
--to=tj@kernel.org \
--cc=dave.kleikamp@oracle.com \
--cc=dmonakhov@openvz.org \
--cc=jeffrey.d.skirvin@intel.com \
--cc=koverstreet@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.mesnier@intel.com \
--cc=mpatlasov@parallels.com \
--cc=tytso@google.com \
--cc=zab@zabbo.net \
/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).