From: Lennart Poettering <mzxreary@0pointer.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vt: add an event interface
Date: Wed, 22 Jul 2009 13:14:52 +0200 [thread overview]
Message-ID: <20090722111452.GA24954@tango.0pointer.de> (raw)
In-Reply-To: <20090721173247.158a6292@lxorguk.ukuu.org.uk>
On Tue, 21.07.09 17:32, Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
>
> > Sounds good to me. Though tbh, in my eyes the "proper" fix for this
> > whole problem would be something which would enable userspace to
> > poll() for VT changes. Having blocking ioctl()s still requires most
>
> The question there is what device do you poll(). It's easy enough to
> magic up a separate vtevent device I guess.
Hmm, maybe we could just use the usual console devices and use SIGERR
or SIGURG or something like that to signal those events? And then have
an ioctl() to actually read them?
> > But OTOH I guess 2 threads are still better than the old situation
> > requiring processes to run 64 threads for listening for VT changes.
> >
> > Oh, and one more note: instead of padding the struct it would probably
> > be more future-proof to simply pass the struct size in addition to the
> > struct to the ioctl().
>
> Padding is a lot simpler and less likely to cause bugs later
> (typecasting, mischecking of sizes etc). For the kernel I favour
> simplicity. A vtevent poll/read interface would be even cleaner so I will
> think about that a bit further.
But this isn't a kernel-internal iface, but something exposed to
userspace. Userspace interfaces should be designed cleanly and
future-proof. And padding structs is just painful and unflexible,
since you might end up not reserving enough space for your future
extensions, however until those extensions actually happen you always
pass uneeded memory to the kernel.
But uh, then again, everything's better than the current situation. As
long as we get something that doesn't require 64 threads for watching
VT switches I am happy.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
prev parent reply other threads:[~2009-07-22 11:15 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 11:36 [PATCH] vt: add an event interface Alan Cox
2009-07-03 6:45 ` Ingo Molnar
2009-07-03 9:08 ` Alan Cox
2009-07-03 9:16 ` Ingo Molnar
2009-07-03 9:44 ` Alan Cox
2009-07-03 9:54 ` Ingo Molnar
2009-07-03 10:06 ` Alan Cox
2009-07-03 10:22 ` Ingo Molnar
2009-07-03 10:44 ` Alan Cox
2009-07-03 13:17 ` Ingo Molnar
2009-07-03 13:37 ` Alan Cox
2009-07-03 14:47 ` Ingo Molnar
2009-07-03 15:02 ` Alan Cox
2009-07-03 15:42 ` Ingo Molnar
2009-07-03 15:48 ` Ingo Molnar
2009-07-03 16:11 ` Alan Cox
2009-07-03 16:24 ` Ingo Molnar
2009-07-03 18:29 ` Alan Cox
2009-07-03 18:41 ` Ingo Molnar
2009-07-03 15:57 ` Ingo Molnar
2009-07-03 15:58 ` Ingo Molnar
2009-07-03 16:26 ` Alan Cox
2009-07-03 16:33 ` Ingo Molnar
2009-07-03 16:42 ` Ingo Molnar
2009-07-03 22:17 ` Jaswinder Singh Rajput
2009-07-04 2:18 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 1/9 -tip] x86: mtrr/amd.c fix trivial style problems Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 2/9 -tip] x86: mtrr/centaur.c fix " Jaswinder Singh Rajput
2009-07-04 2:21 ` [PATCH 3/9 -tip] x86: mtrr/cleanup.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:22 ` [PATCH 4/9 -tip] x86: mtrr/cyrix.c " Jaswinder Singh Rajput
2009-07-04 2:23 ` [PATCH 5/9 -tip] x86: mtrr/generic.c fix " Jaswinder Singh Rajput
2009-07-04 2:23 ` [PATCH 6/9 -tip] x86: mtrr/if.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 7/9 -tip] x86: mtrr/mtrr.h " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 8/9 -tip] x86: mtrr/state.c " Jaswinder Singh Rajput
2009-07-04 2:26 ` [PATCH 9/9 -tip] x86: mtrr/main.c fix " Jaswinder Singh Rajput
2009-07-05 18:21 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Ingo Molnar
2009-07-05 22:09 ` Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/amd.c: tip-bot for Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/centaur.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cleanup.c tip-bot for Jaswinder Singh Rajput
2009-07-04 21:12 ` Yinghai Lu
2009-07-05 0:27 ` Ingo Molnar
2009-07-05 6:02 ` Jaswinder Singh Rajput
2009-07-05 11:59 ` Pekka Enberg
2009-07-05 13:19 ` Jaswinder Singh Rajput
2009-07-05 20:11 ` Thomas Gleixner
2009-07-05 22:16 ` Jaswinder Singh Rajput
2009-07-05 18:04 ` Ingo Molnar
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cyrix.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/generic.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/if.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/mtrr.h tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/state.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/main.c tip-bot for Jaswinder Singh Rajput
2009-07-05 7:57 ` [tip:x86/cleanups] x86: Further clean up of mtrr/generic.c tip-bot for Ingo Molnar
2009-07-03 16:10 ` [PATCH] vt: add an event interface Ingo Molnar
2009-07-03 18:24 ` Alan Cox
2009-07-21 16:23 ` Lennart Poettering
2009-07-21 16:32 ` Alan Cox
2009-07-22 11:14 ` Lennart Poettering [this message]
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=20090722111452.GA24954@tango.0pointer.de \
--to=mzxreary@0pointer.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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