Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111AbcLLLl0 (ORCPT ); Mon, 12 Dec 2016 06:41:26 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:56368 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbcLLLlY (ORCPT ); Mon, 12 Dec 2016 06:41:24 -0500 X-Greylist: delayed 441 seconds by postgrey-1.27 at vger.kernel.org; Mon, 12 Dec 2016 06:41:24 EST Date: Mon, 12 Dec 2016 11:34:01 +0000 From: Eric Wong To: Dmitry Banschikov Cc: linux-kernel@vger.kernel.org, John Stultz , Deepa Dinamani Subject: Re: epoll_wait inaccurate timeout Message-ID: <20161212113401.GA25817@starla> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 30 +Cc folks who may know about timer stuff on epoll. Dmitry Banschikov wrote: > Hi! > > I have a problem caused by inaccurate timeouts in epoll_wait(2). > Here are some parts of strace -tt output: Which kernel version are you using? > 22578 09:33:46.959791 epoll_wait(5, > 22578 09:33:50.010794 <... epoll_wait resumed> [], 128, 1498) = 0 > ... > 22034 09:35:07.686896 epoll_wait(5, > 22034 09:35:09.482526 <... epoll_wait resumed> [{EPOLLIN, > {u32=151458248, u64=151458248}}], 128, 362) = 1 > ... > 22036 09:35:41.433241 epoll_wait(5, > 22036 09:35:43.176881 <... epoll_wait resumed> [], 128, 97) = 0 > > In each example epoll_wait is blocked for too longer then asked in timeout. > > Is it normal? I don't think so, unless you have a huge /proc//timerslack_ns set. But I mainly use -1 or 0 as the timeout value. > Please CC me. That's standard procedure, here :)