From patchwork Thu Sep 18 19:44:19 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarek Poplawski X-Patchwork-Id: 547 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 045E8DDE26 for ; Fri, 19 Sep 2008 05:43:17 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755035AbYIRTnL (ORCPT ); Thu, 18 Sep 2008 15:43:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754946AbYIRTnL (ORCPT ); Thu, 18 Sep 2008 15:43:11 -0400 Received: from fk-out-0910.google.com ([209.85.128.187]:36903 "EHLO fk-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754288AbYIRTnK (ORCPT ); Thu, 18 Sep 2008 15:43:10 -0400 Received: by fk-out-0910.google.com with SMTP id 18so54229fkq.5 for ; Thu, 18 Sep 2008 12:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=RleCE9xAxnpuoDTg6uwMwWfl9akp8ZYeYA3Csni+OZ4=; b=WQjRRQ45Wb0KwYqHWqcNjtdKoLAdZsjuNEJQdeK7NrVAv31oa90ae4bHeOExM5UI6S 4f5h5yY/sR2M+9tmi5ihrxfioL0PDAVa6KquRjob5RhOx9yH1R76jcL761v5pkdlhHZ6 u9Emk5X7JVbDrWGRVBciNgo/AszNIyUByFDjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:in-reply-to:user-agent; b=IWwR+MvVr4kQH5a2Fhu26ATRFoO2gtkNuGu++xwA2s5SteZZNV/N2XIhFOGZxLu+P0 jnBsjMbckiApz5K0wd8BQSWHc9pXi1g1QMvnN/Th+ENKWrbqGpHmoC5xMqd3Djrfz/Dl CwyTS1C/VvOARPMtvSL9GG4Xhjvw/m73H4sNY= Received: by 10.180.234.2 with SMTP id g2mr2206420bkh.54.1221766988039; Thu, 18 Sep 2008 12:43:08 -0700 (PDT) Received: from ami.dom.local ( [83.27.4.19]) by mx.google.com with ESMTPS id c28sm18996229fka.18.2008.09.18.12.43.04 (version=SSLv3 cipher=RC4-MD5); Thu, 18 Sep 2008 12:43:06 -0700 (PDT) Date: Thu, 18 Sep 2008 21:44:19 +0200 From: Jarek Poplawski To: Alexander Duyck Cc: netdev@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, kaber@trash.net Subject: Re: [RFC PATCH] sched: only dequeue if packet can be queued to hardware queue. Message-ID: <20080918194419.GA2982@ami.dom.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20080918063036.27934.91273.stgit@localhost.localdomain> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Alexander Duyck wrote, On 09/18/2008 08:43 AM: ... > --- > This patch changes the behavior of the sch->dequeue to only > dequeue a packet if the queue it is bound for is not currently > stopped. This functionality is provided via a new op called > smart_dequeue. > > Signed-off-by: Alexander Duyck > --- I think, these changes make sense only if they don't add more then give, and two dequeues (and still no way to kill requeue) is IMHO too much. (I mean the maintenance.) As far as I can see it's mainly for HFSC's qdisc_peek_len(), anyway this looks like main issue to me. Below a few small doubts. (I need to find some time for details yet.) BTW, this patch needs a checkpatch run. diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index b786a5b..4082f39 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -90,10 +90,7 @@ extern void __qdisc_run(struct Qdisc *q); static inline void qdisc_run(struct Qdisc *q) { - struct netdev_queue *txq = q->dev_queue; - - if (!netif_tx_queue_stopped(txq) && I think, there is no reason to do a full dequeue try each time instead of this check, even if we save on requeuing now. We could try to save the result of the last dequeue, e.g. a number or some mask of a few