|
|
Log in / Subscribe / Register

Re: fanotify as syscalls

From:  Linus Torvalds <torvalds-AT-linux-foundation.org>
To:  Jamie Lokier <jamie-AT-shareable.org>
Subject:  Re: fanotify as syscalls
Date:  Thu, 17 Sep 2009 09:40:16 -0700 (PDT)
Message-ID:  <alpine.LFD.2.01.0909170934450.4950@localhost.localdomain>
Cc:  Evgeniy Polyakov <zbr-AT-ioremap.net>, Eric Paris <eparis-AT-redhat.com>, David Miller <davem-AT-davemloft.net>, linux-kernel-AT-vger.kernel.org, linux-fsdevel-AT-vger.kernel.org, netdev-AT-vger.kernel.org, viro-AT-zeniv.linux.org.uk, alan-AT-linux.intel.com, hch-AT-infradead.org
Archive‑link:  Article



On Wed, 16 Sep 2009, Jamie Lokier wrote:
> 
> I'd forgotten about Linus' strace argument.  That's a good one.
> 
> Of course everything should be a syscall by that argument :-)

Oh yes, everything _should_ be a syscall.

The problem is that many things are too "amorphous" to be system calls, 
and don't have any sane generic semantics (ie they only act on a specific 
device node). So we have ioctl's etc for those things.

And then we have page faults. I've long wished that from a system call 
tracing standpoint we could show page faults as pseudo-system-calls (at 
least as long as they happen from user space - trying to handle nesting is 
not worth it). It would make it _so_ much more obvious what the 
performance patterns are if you could just do

	strace -ttT firefox

for the cold-cache case and you'd see where the time is really spent.

(yeah, yeah, you can get that kind of information other ways, but it's a 
hell of a lot less convenient than just getting a nice trace with 
timestamps).

> And strace can trace some ioctls and setsockopts.  (But it's never
> pretty to see isatty() showing in strace as SNDCTL_TMR_TIMEBASE :-)

Yes, strace can fix things up, and show "send a packet" as "fanotify". But 
it's nasty and hard. 

Quite frankly, I have _never_ever_ seen a good reason for talking to the 
kernel with some idiotic packet interface. It's just a fancy way to do 
ioctl's, and everybody knows that ioctl's are bad and evil. Why are fancy 
packet interfaces suddenly much better?

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



to post comments


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds