From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jari Sundell" Subject: Re: [take12 0/3] kevent: Generic event handling mechanism. Date: Wed, 23 Aug 2006 02:28:32 +0200 Message-ID: References: <11561555871530@2ka.mipt.ru> <1156230051.8055.27.camel@entropy> <20060822072448.GA5126@2ka.mipt.ru> <1156234672.8055.51.camel@entropy> <20060822180135.GA30142@2ka.mipt.ru> <20060822194706.GA3476@2ka.mipt.ru> <20060822231129.GA18296@ms2.inr.ac.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Evgeniy Polyakov" , "Nicholas Miell" , lkml , "David Miller" , "Ulrich Drepper" , "Andrew Morton" , netdev , "Zach Brown" , "Christoph Hellwig" Return-path: Received: from nz-out-0102.google.com ([64.233.162.198]:38449 "EHLO nz-out-0102.google.com") by vger.kernel.org with ESMTP id S1751150AbWHWA2d (ORCPT ); Tue, 22 Aug 2006 20:28:33 -0400 Received: by nz-out-0102.google.com with SMTP id 14so628580nzn for ; Tue, 22 Aug 2006 17:28:32 -0700 (PDT) To: "Alexey Kuznetsov" In-Reply-To: <20060822231129.GA18296@ms2.inr.ac.ru> Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 8/23/06, Alexey Kuznetsov wrote: > Let me explain, as a person who did this mistake and deeply > regrets about this. > > F.e. in this case you just cannot use kevents in 32bit application > on x86_64, unless you add the whole translation layer inside kevent core. > Even when you deal with plain syscall, translation is a big pain, > but when you use mmapped buffer, it can be simply impossible. > > F.e. my mistake was "unsigned long" in struct tpacket_hdr in linux/if_packet.h. > It makes use of mmapped packet socket essentially impossible by 32bit > applications on 64bit archs. There are system calls that take timespec, so I assume the magic is already available for handling the timeout argument of kevent. Although I'm not entirely sure about the kqueue timer interface, there isn't any reason timespec would need to be written to the mmaped buffer for the rest. AFAICS, only struct ukevent is visible to the user, same would go for kqueue's struct kevent. Rakshasa