From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FROM_LOCAL_DIGITS,FROM_LOCAL_HEX,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F41FC43613 for ; Thu, 20 Jun 2019 06:08:33 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4938221537 for ; Thu, 20 Jun 2019 06:08:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tj7DnPGh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4938221537 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92) (envelope-from ) id 1hdqF0-0004YS-OT; Thu, 20 Jun 2019 02:08:10 -0400 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1hdqEx-0004YA-A7 for kernelnewbies@kernelnewbies.org; Thu, 20 Jun 2019 02:08:07 -0400 Received: by mail-oi1-x232.google.com with SMTP id 65so1251819oid.13 for ; Wed, 19 Jun 2019 23:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0mrOK5xaT7snBp/nCDvAZdcUaFVpEeevgSdck369fZI=; b=Tj7DnPGhGjUnxGLZlxU15D0wZJ2czPPtq6ifMk94KM7tAxQa02GTVucVH5Su0Sqwov Hq8AbjWRJCojggYKEmtC79DF4k/L5a2qspQoFsWwZ583+L+VDRC8X0QsYZJINhSprhNY lOH+CKYjhFSyuFrIwrDHOL84S0wM8Mf+DXUCZqUS6GtXc4tZkp0iazIfQwrEJl9OFi/T lmQ73dwSD/0zfviUEw7t6IfY4Pfkjn1bq9gM3rRVEJPW5rlriGwKTpP3chSoImTSApKb g7IWN2I6MELTpVTovK0Mdrid407PSJzQ0YxG6PW37LX4vlcFnUm7j40VtyezDykRbd7y 6CjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0mrOK5xaT7snBp/nCDvAZdcUaFVpEeevgSdck369fZI=; b=B8OtiFbo8Tzcnh4NGnvHGoUd4hN0Q3wP+BgSzpSSvzEWnZD+QSSuhzHv158fmKQ9S9 hqKyYFLuufTPX8aZ8/uXDWapel2EvdFNnDANOzhWNNliCqVbRaIf7e4uojd9Gnbc5h7S 315SflkUA7SnToMREJVYmUhX0jMIuQHiVEDqLgw6jGA7JwlW9uABjilEW2dOasSEZahw LSbUz2d4Os++s/yAljz2KbLAZeoOGuGytVWJaatQ/amy5+ZYaitn/lrE7+/BaI/WZex7 0Hnvm0ID+A7k3RqjPGK8XAnO8L5JPdGv3iAVRR/IXWkxQILalxVX5dOiw1oOL+Bt2ahO BzDw== X-Gm-Message-State: APjAAAXpxEQ39XhwGAZw+yCaLxTUTTEtRJ6ZqohPiAn3BCEG+E3eOooX oepYJAvedHV7DhJg4fdkJY1r8CI19f72JRftbiY= X-Google-Smtp-Source: APXvYqx2iQ2SZMxbhcmMMWicEwnhPOsIJJVOCsICHi5MY2+Hy95gZ3/sTxCtH03Hs7PyooqPYHZ6wsYcCa7oZL/6Hmg= X-Received: by 2002:aca:c243:: with SMTP id s64mr4987784oif.160.1561010885288; Wed, 19 Jun 2019 23:08:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: anish singh Date: Thu, 20 Jun 2019 11:37:54 +0530 Message-ID: Subject: Re: how long wait_for_completion_interruptible_timeout() blocks To: Subhashini Rao Beerisetty Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5711333038509157903==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============5711333038509157903== Content-Type: multipart/alternative; boundary="0000000000004ee92e058bbb2bd9" --0000000000004ee92e058bbb2bd9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 19, 2019 at 10:47 PM Subhashini Rao Beerisetty < subhashbeerisetty@gmail.com> wrote: > Hi All, > > I=E2=80=99ve two Linux systems, I tried to measure how long > wait_for_completion_interruptible_timeout() blocked after completion > is signaled by complete() call. I noticed two different results in > both systems. > > In one system I noticed this duration in between 10 to 60 micro > seconds, where as in other system it is in between 20 to 500 micro > seconds. I=E2=80=99d like to know what factors can affect this latency? A= lso, > is there any solution to reduce this latency? This is a problem which is fixed by RT Linux patches. It is taking time as Linux is not RTOS and scheduler took time to put your task in running state which is expected and depends on many factors: such as load, interrupts and so on. > > > > Thanks, > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > --0000000000004ee92e058bbb2bd9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jun 19, 2019 at 10:47 PM Subhashini Rao Beerisetty = <subhashbeerisetty@gmail.= com> wrote:
Hi All,

I=E2=80=99ve two Linux systems, I tried to measure how long
wait_for_completion_interruptible_timeout() blocked after completion
is signaled by complete() call. I noticed two different results in
both systems.

In one system I noticed this duration in between 10 to 60 micro
seconds, where as in other system=C2=A0 it is in between 20 to 500 micro seconds. I=E2=80=99d like to know what factors can affect this latency? Als= o,
is there any solution to reduce this latency?

This is a problem which is fixed by RT Linux p= atches.
It is taking time as Linux is not RTOS and s= cheduler took time to put your task in running state which is expected and = depends on many factors: such as load, interrupts and so on.



Thanks,

_______________________________________________
Kernelnewbies mailing list
Kernel= newbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailma= n/listinfo/kernelnewbies
--0000000000004ee92e058bbb2bd9-- --===============5711333038509157903== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============5711333038509157903==--