Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1367949ybh; Thu, 23 Jul 2020 07:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOAf6UU0oJONxC1B6zM8LEdmAPfBdds9wZWkUXeE3nTF+lFwLPK8KcwB5ncRZQV1WuLDl3 X-Received: by 2002:a17:907:20d1:: with SMTP id qq17mr4726913ejb.214.1595513631530; Thu, 23 Jul 2020 07:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595513631; cv=none; d=google.com; s=arc-20160816; b=e7vNUTRfZVyH2hsguILP9HG+U4HwzeVBamBDcoOJWrziGEWauaDBe1ZEP8pi+BWsc+ X20hzvnfvRgfynfdhMvEOsISkiGnHPAqN0XhAe+yglfviruvV1wvyY9s9mceZbDJJhrU Fjbrfp7UptY6M47qtuj6HVG9XPBeZRJOgpMB9d7svO/MV/rGpq4jHfA1J4IK1uAPnOLe /6hlkMPQi5hqrrKKO/LtZfPg4fQwCYTbCOtSWCdlDb2tq28miag7EIv9ar9Z+4PYMVL9 Mp7qKz9hwsF25bGZdhv8FB+CkxBk0BppeAkwqh3LWitsF13weC1QcpB8ZERvdx3Ndr/k cLqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NYds3Nco1psIbFhxscSbi5hgJh8BjumXm2M9T6KAWQM=; b=TRIyb4vta40P6VuFVZVesMpnIxYNgRPuHc8on7CfaRfvDwVvDUMOONt0zYhWbFH58t 19GMdz5aXBNR3MGWOHWxX8BufEsOdRMnvF3xAnSgAj2rnQ/Xhu4rVbhl/KFLtP7fJ0TA 7U3IWxHP9ATwTAd6cU09ShgOy+w0LEPi6lrjVSiy5lyJrHqGqKoUK1Z60gId3WrFecxF 9XU71smsPbPVGmuvVm7esEC8yiH2doZYP2WG1SKcLV4OBoCaFgjjRKaM+zrbqTFJY2r5 qp2G40B5hKj1rLB7MCgayvyd1A7a+FjPr3DYiB3r2MKnD8Np1GWkOEa7Fi6n2fuicy0U 90yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AGzWAHNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q20si1981802edw.521.2020.07.23.07.13.27; Thu, 23 Jul 2020 07:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AGzWAHNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729174AbgGWOML (ORCPT + 99 others); Thu, 23 Jul 2020 10:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgGWOMK (ORCPT ); Thu, 23 Jul 2020 10:12:10 -0400 Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE6CC0619DC for ; Thu, 23 Jul 2020 07:12:10 -0700 (PDT) Received: by mail-oo1-xc41.google.com with SMTP id w1so1135340ooj.2 for ; Thu, 23 Jul 2020 07:12:10 -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=NYds3Nco1psIbFhxscSbi5hgJh8BjumXm2M9T6KAWQM=; b=AGzWAHNpaimo3sPQx/8NtCk0U0hKvSJMPiU2ONe6dgO+wiQunz4CKjUA//5cAVVjYG jJlwmT4WVOzgrxS+HuHVU0IIFXDnkHlLzBNaxMmYTr02HD+ajOcF2Qpsn6kzGo7M9dwN 6+PcwiZNcNzSV9fJD/r/mCwR5ERf17J+87FW12kyg6NbhHkxI262lrPlBTCStTUKfy+M AJD9XbqxHZj92W2AH3So2qmRGoixRa/dg0OSMdI6nEcZczUZhG1sK55WPTVLTMTbbJvw +mITnPUnog5V/8e+DZIWDsKN30AK6BcH2zjfF9EDRzDe02GA5zpGhhzyG0tYINwkQAk6 TLwA== 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=NYds3Nco1psIbFhxscSbi5hgJh8BjumXm2M9T6KAWQM=; b=YnkH+Xg8jfvW391qiOjY9y0qSYyTGqWKcRa0RrNtYQA5L/sv5qmKGncOO3KoGhBofn /ZCHmFhgKIyO6FLsiVChvAWUkJEpqLQzdxYLxVH90raoOwZjw97a0dAZ80ZRT1DNSzRa E3N6PDgK7W7NJRd8ixilLKMblanxI4R71p+sEmk+OtUZn1FTrsJZG2cFQseTvaedVkiz I4Psdi6Ljdt5aApJWCC8GsnizJGf0E3E1hJ/j1I16Yj1ESmrUb7R70fSlKkvraN/W0mQ yfu1QVPDQVD+d2fh4YOqDqTJ6oM2Bl6NFZAHYLQjvkMK6NbPB5Mqh8nURTnvCakH48OV 4CnQ== X-Gm-Message-State: AOAM533GuR1uF8HLxTAdJ+FiEcX7WFVEiiXNeBmCkZxEHA5U0OipEQJj SYKp0F2YbvuuIxAinG41B1b6v89MBtHcxwOd8aY= X-Received: by 2002:a4a:d4d9:: with SMTP id r25mr4653363oos.51.1595513530264; Thu, 23 Jul 2020 07:12:10 -0700 (PDT) MIME-Version: 1.0 References: <1595480041-10597-1-git-send-email-qianjun.kernel@gmail.com> <87d04mxs9t.fsf@nanos.tec.linutronix.de> In-Reply-To: <87d04mxs9t.fsf@nanos.tec.linutronix.de> From: jun qian Date: Thu, 23 Jul 2020 22:11:59 +0800 Message-ID: Subject: Re: [PATCH V3] Softirq:avoid large sched delay from the pending softirqs To: Thomas Gleixner Cc: peterz@infradead.org, will@kernel.org, luto@kernel.org, Uladzislau Rezki , linux-kernel@vger.kernel.org, Yafang Shao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 9:41 PM Thomas Gleixner wrote: > > qianjun.kernel@gmail.com writes: > > From: jun qian > > + /* > > + * the softirq's action has been running for too much time > > + * so it may need to wakeup the ksoftirqd > > + */ > > + if (need_resched() && ktime_get() > end) > > + break; > > As per my reply on V2 this is leaking non handled pending bits. If you > do a V4, can you please use sched_clock() instead of ktime_get()? > The reason why the non handled pending bits leaked is set_softirq_pending(0) called in the start, if the loop is broken, the not handled bit will leak. This is my understanding, I am not sure if it is correct or not. Looking forward to your reply. Thank you so much. > Thanks, > > tglx