From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 0877F271 for ; Fri, 30 Jun 2017 12:14:33 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id w126so105496802wme.0 for ; Fri, 30 Jun 2017 03:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lyj75CO1ZLMnDuu/6N4rNJwKDrW6sP07BZS3UoOvTwc=; b=2FUvj7eBur/AYR54ncg9q33j/lvwlp0k8VoZ1jEPXmS09GYAmhLZfzedN7QBwNps18 JE4ydb24TBnJPGn6HnoEzqACY+HD/cdO3ojP+gJcEuBq2eMOvAtuXCEUQexTLIWON59d pauGI6LYbMscyw+fQlYFXPSB8tQRn0ArvTtZlxBD0xslKVUNaz/n9oVEMf4YRnbLPxaX fk0CzrAt+Ji77rkrz0SS+oOqgmGoF+lMxmUJO40CCXLwyHjo3sZXYdjRDkLjgyjBF5Z0 bRwD2SbzY/mCU/qtu3ogxNp7GJT9g7G/rwBo+OyZfZqW7+b6Tm31i3q9Bcfu8aa/ZSIl 0GqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lyj75CO1ZLMnDuu/6N4rNJwKDrW6sP07BZS3UoOvTwc=; b=qA6OfXRVGPBt7F0ZCqCTyeNCqrXksgyS9SbDhrHXKPnz9aXdtoI/MPB7qQjw4gR3Sp 8UMzJNjtNqk7veQrFMZ1p4johwxRWhFyfdMC9rkXO8MmWYeQHiShv6IFQrBq1JYoqv/F U7sa5rDOIrZg5j1uJx0ubWIl86+tpJxp/ReAGgCnL0mMY0MTGZDsheOqHkUAnkz/qNmK vSaRz3KBTA5CyaELO/9SQRbdcyq4S1Qp9lTKFoRMDBveIRX0y7Fze+QFzjlkJnLyX9Sv mkMZb6ZJ71XRNLYkg8wFHbTNjOtpFm4oW22d+pApjrldZr5CshpqBPWKq0uRPJDSu4tF 1uDw== X-Gm-Message-State: AKS2vOyyxaPGwoyNv3tanikful0vtfjTYM8c4SfW9+1A3Zix0sO48qLb MSGkOQ3ZQEgqz+fYQjE= X-Received: by 10.28.131.202 with SMTP id f193mr4993020wmd.89.1498817673666; Fri, 30 Jun 2017 03:14:33 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id l46sm5362990wrl.15.2017.06.30.03.14.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jun 2017 03:14:33 -0700 (PDT) Date: Fri, 30 Jun 2017 12:14:31 +0200 From: Olivier Matz To: Bruce Richardson Cc: Robert Sanford , dev@dpdk.org Message-ID: <20170630121431.0899f624@platinum> In-Reply-To: <20170531091621.203189-2-bruce.richardson@intel.com> References: <20170428132538.15995-1-bruce.richardson@intel.com> <20170531091621.203189-1-bruce.richardson@intel.com> <20170531091621.203189-2-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/3] timer: inform periodic timers of multiple expiries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 10:14:34 -0000 Hi Bruce, On Wed, 31 May 2017 10:16:19 +0100, Bruce Richardson wrote: > if timer_manage is called much less frequently than the period of a > periodic timer, then timer expiries will be missed. For example, if a timer > has a period of 300us, but timer_manage is called every 1ms, then there > will only be one timer callback called every 1ms instead of 3 within that > time. > > While we can fix this by having each function called multiple times within > timer-manage, this will lead to out-of-order timeouts, and will be slower > with all the function call overheads - especially in the case of a timeout > doing something trivial like incrementing a counter. Therefore, we instead > modify the callback functions to take a counter value of the number of > expiries that have passed since the last time it was called. > > Signed-off-by: Bruce Richardson Sorry, it's probably a bit late to react. If it's too late, nevermind. I'm not really convinced that adding another argument to the callback function is the best solution. Invoking the callbacks several times would result in a much smaller patch that does not need a heavy ABI compat. I'm not sure the function call overhead is really significant in that case. I'm not sure I understand your point related to out-of-order timeouts, nor I see why this patchset would behave better. About the problem itself, my understanding was that the timer manage function has to be called frequently enough to process the timers. Olivier