From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750880AbXCGMC1 (ORCPT ); Wed, 7 Mar 2007 07:02:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751189AbXCGMC0 (ORCPT ); Wed, 7 Mar 2007 07:02:26 -0500 Received: from nz-out-0506.google.com ([64.233.162.229]:13920 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbXCGMCZ (ORCPT ); Wed, 7 Mar 2007 07:02:25 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HQoV3NPcsAqYCRW9TnQoAbDE+mAmpVqtXxvoq2mimILvaBrprkULMpJcF6dAfynujVnYT9tySJsbS+YfDRK35wB+WaUjKNPz4SyYQ0K7Gzb13BKD8NR41OUmUEA3VSvPpKhEoC6xvrV4nfYU3e3Di2LpwMetwc8O3hVh68LrzvY= Message-ID: Date: Wed, 7 Mar 2007 09:02:24 -0300 From: "Kirk Kuchov" To: "Pavel Machek" Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Cc: "Davide Libenzi" , "Evgeniy Polyakov" , "Ingo Molnar" , "Eric Dumazet" , "Theodore Tso" , "Linus Torvalds" , "Ulrich Drepper" , "Linux Kernel Mailing List" , "Arjan van de Ven" , "Christoph Hellwig" , "Andrew Morton" , "Alan Cox" , "Zach Brown" , "David S. Miller" , "Suparna Bhattacharya" , "Jens Axboe" , "Thomas Gleixner" In-Reply-To: <20070306081935.GB2040@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070303100625.GA22557@2ka.mipt.ru> <20070303203140.GA756@2ka.mipt.ru> <20070306081935.GB2040@elf.ucw.cz> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/07, Pavel Machek wrote: > > >As for why common abstractions like file are a good thing, think about why > > >having "/dev/null" is cleaner that having a special plug DEVNULL_FD fd > > >value to be plugged everywhere, > > > > This is a stupid comparaison. By your logic we should also have /dev/stdin, > > /dev/stdout and /dev/stderr. > > Bzzt, wrong. We have them. > > pavel@amd:~$ ls -al /dev/std* > lrwxrwxrwx 1 root root 4 Nov 12 2003 /dev/stderr -> fd/2 > lrwxrwxrwx 1 root root 4 Nov 12 2003 /dev/stdin -> fd/0 > lrwxrwxrwx 1 root root 4 Nov 12 2003 /dev/stdout -> fd/1 > pavel@amd:~$ ls -al /proc/self/fd > total 0 > dr-x------ 2 pavel users 0 Mar 6 09:18 . > dr-xr-xr-x 4 pavel users 0 Mar 6 09:18 .. > lrwx------ 1 pavel users 64 Mar 6 09:18 0 -> /dev/ttyp2 > lrwx------ 1 pavel users 64 Mar 6 09:18 1 -> /dev/ttyp2 > lrwx------ 1 pavel users 64 Mar 6 09:18 2 -> /dev/ttyp2 > lr-x------ 1 pavel users 64 Mar 6 09:18 3 -> /proc/2299/fd > pavel@amd:~$ I don't believe I'm wasting my time explaining this. They don't exist as /dev/null, they are just fucking _LINKS_. I could even "ln -s /proc/self/fd/0 sucker". A real /dev/stdout can/could even exist, but that's not the point! It remains a stupid comparison because /dev/stdin/stderr/whatever "must" be plugged, else how could a process write to stdout/stderr that it coud'nt open it ? The way things are is not because it's cleaner to have it as a file but because it's the only sane way. /dev/null is not a must have, it's mainly used for redirecting purposes. A sys_nullify(fileno(stdout)) would rule out almost any use of /dev/null. > > >As for why common abstractions like file are a good thing, think about why > > >having "/dev/null" is cleaner that having a special plug DEVNULL_FD fd > > >value to be plugged everywhere, > > >But here the list could be almost endless. > > >And please don't start the, they don't scale or they need heavy file > > >binding tossfeast. They scale as well as the interface that will receive > > >them (poll, select, epoll). Heavy file binding what? 100 or so bytes for > > >the struct file? How many signal/timer fd are you gonna have? Like 100K? > > >Really moot argument when opposed to the benefit of being compatible with > > >existing POSIX interfaces and being more Unix friendly. > > > > So why the HELL don't we have those yet? Why haven't you designed > > epoll with those in mind? Why don't you back your claims with patches? > > (I'm not a kernel developer.) > > Either stop flaming kernel developers or become one. It is that > simple. > If I were to become a kernel developer I would stick with FreeBSD. At least they have kqueue for about seven years now. -- Kirk Kuchov