From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932334AbbJUTxi (ORCPT ); Wed, 21 Oct 2015 15:53:38 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34588 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755846AbbJUTxh (ORCPT ); Wed, 21 Oct 2015 15:53:37 -0400 Subject: Re: [RFC PATCH] bpf: Add new bpf map type for timer To: He Kuang , ast@kernel.org, davem@davemloft.net, daniel@iogearbox.net, mingo@kernel.org, rostedt@goodmis.org, xiakaixu@huawei.com References: <1445232889-155696-1-git-send-email-hekuang@huawei.com> <562762B8.5060706@huawei.com> Cc: wangnan0@huawei.com, linux-kernel@vger.kernel.org From: Alexei Starovoitov Message-ID: <5627ED3D.5080004@plumgrid.com> Date: Wed, 21 Oct 2015 12:53:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562762B8.5060706@huawei.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/21/15 3:02 AM, He Kuang wrote: > Here's a hypothetical scenario to illustrate the use of timer map. > > A video frame is updated between frame_refresh_start() and > frame_refresh_end(), in most cases, the interval between these two > functions is less than 40ms, but occasionally over 200ms. > > We can set a timer which alarm after the frame_refresh_start() has > been executed 42ms(slightly larger than 40ms) and destory this timer > if frame_refresh_end() is called. So, for most cases, the timer is not > triggered, this can significantly reduce the amount of trace data. As a feature it sounds useful, but implementation is not acceptable. You cannot have one callback stub for all users of this feature.