From owner-freebsd-current@FreeBSD.ORG Thu Feb 27 07:19:40 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1581125C for ; Thu, 27 Feb 2014 07:19:40 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id C28B81146 for ; Thu, 27 Feb 2014 07:19:39 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id EB47017FFF9; Thu, 27 Feb 2014 08:08:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id CAC3E181AA1; Thu, 27 Feb 2014 08:09:52 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9mMj-aXzJL3h; Thu, 27 Feb 2014 08:09:52 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 22C75181AA0; Thu, 27 Feb 2014 08:09:52 +0100 (CET) Message-ID: <530EE4B9.6080605@bitfrost.no> Date: Thu, 27 Feb 2014 08:09:45 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Kohji Okuno , freebsd-current@freebsd.org Subject: Re: kqueue for usb_dev References: <20140227.142615.924807465819500067.okuno.kohji@jp.panasonic.com> <20140227060232.GA47921@funkthat.com> In-Reply-To: <20140227060232.GA47921@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 07:19:40 -0000 On 02/27/14 07:02, John-Mark Gurney wrote: > 2) Why do you try to start read/write transfers in the _filter? You > should just check to see if data is available and not do work.. This > is also important since kqueue calls the filter just before delivering > the knote to userland to verify that there is still data, and it will > call your _event function for each knote on the fd... The work should > be started through other mechanisms, like read/write syscall or > interrupt or timeout/callout... If it's required to get results from > USB_IF_POLL, then it's fine.. Hi, In the case where you start polling and don't do any reads or writes, the poller needs to get the data traffic going. --HPS