From owner-freebsd-arch@FreeBSD.ORG Sun Nov 7 02:50:26 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1441E106566B; Sun, 7 Nov 2010 02:50:26 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id C8BDB8FC08; Sun, 7 Nov 2010 02:50:25 +0000 (UTC) Received: by pzk12 with SMTP id 12so205459pzk.13 for ; Sat, 06 Nov 2010 19:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=d3KxkfekhcD4Ndm7Mui5q+PXyovgxlAwzsN5vwlhkk4=; b=lwKjPDe79lOV11qrxB4IgEWQFw/KYK/F2I8svifiFKSagcK4d79dNAlpTi6M76Myu3 IPbziL4qokHZiSs9n/HO8cDcIhCmWnWDviN/MDCUBxisgHMDY79b7GeSFdIeAtWZ0iAO GELpOy3T22ddOlugLZ6VOQqcXQLLVFPsM+aYk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=aDmO7bxkLccsLic4Mb73Zpmjf+3EbBuqKNzeT7GjGEjVi9myZQFBPvGbe8Hd7bIUxZ 4sSWmSMNxv4KUBW1Av1StzoTnSeROYwJ2laY3roX6P+vHv7sWrTNFMZYME8zYLnThiOt vXWuLMgJ1NMHytdg7FNEMI2jxEQrgt+/KNtA0= Received: by 10.142.142.18 with SMTP id p18mr2997649wfd.398.1289096594815; Sat, 06 Nov 2010 19:23:14 -0700 (PDT) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id q13sm5017643wfc.5.2010.11.06.19.23.11 (version=SSLv3 cipher=RC4-MD5); Sat, 06 Nov 2010 19:23:12 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Sat, 06 Nov 2010 19:23:18 -0700 From: Weongyo Jeong Date: Sat, 6 Nov 2010 19:23:18 -0700 To: Hans Petter Selasky Message-ID: <20101107022318.GF92881@weongyo> Mail-Followup-To: Hans Petter Selasky , freebsd-current@freebsd.org, freebsd-arch@freebsd.org, Matthew Fleming , freebsd-usb@freebsd.org References: <201011012054.59551.hselasky@c2i.net> <201011051836.39697.hselasky@c2i.net> <201011051930.38530.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011051930.38530.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: freebsd-current@freebsd.org, Matthew Fleming , freebsd-usb@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] Outline of USB process integration in the kernel taskqueue system X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2010 02:50:26 -0000 On Fri, Nov 05, 2010 at 07:30:38PM +0100, Hans Petter Selasky wrote: > Hi, > > In the patch attached to this e-mail I included Matthew Fleming's patch > aswell. > > 1) I renamed taskqueue_cancel() into taskqueue_stop(), hence that resembles > the words of the callout and USB API's terminology for doing the same. > > 2) I turns out I need to have code in subr_taskqueue.c to be able to make the > operations atomic. > > 3) I did not update the manpage in this patch. Will do that before a commit. > > 4) My patch implements separate state keeping in "struct task_pair", which > avoids having to change any KPI's for now, like suggested by John Baldwin I > think. > > 5) In my implementation I hard-coded the priority argument to zero, so that > enqueuing is fast. > > Comments are welcome! The patch looks almost you moved usb_process.c code into taskqueue(9) that I means it still follows that a entry which enqueued at last should be executed at last. It seems that at least it's not a general for taskqueue(9). In my humble opinion it looks a trick. I think it'd better to find a general solution to solve it though I used sx(9) lock in my patches. regards, Weongyo Jeong