From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saeed Mahameed Subject: Re: [PATCH net-next V2 3/4] net/mlx5e: Add HW timestamping (TS) support Date: Tue, 22 Dec 2015 11:56:56 +0200 Message-ID: References: <1450647991-13736-1-git-send-email-saeedm@mellanox.com> <1450647991-13736-4-git-send-email-saeedm@mellanox.com> <20151221091509.GA2297@localhost.localdomain> <20151221183508.GA13533@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Saeed Mahameed , "David S. Miller" , netdev@vger.kernel.org, Or Gerlitz , Eran Ben Elisha , Tal Alon , Majd Dibbiny , Achiad Shochat To: Richard Cochran Return-path: Received: from mail-yk0-f177.google.com ([209.85.160.177]:36756 "EHLO mail-yk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932172AbbLVJ45 (ORCPT ); Tue, 22 Dec 2015 04:56:57 -0500 Received: by mail-yk0-f177.google.com with SMTP id x184so159759207yka.3 for ; Tue, 22 Dec 2015 01:56:57 -0800 (PST) In-Reply-To: <20151221183508.GA13533@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Dec 21, 2015 at 8:35 PM, Richard Cochran wrote: > On Mon, Dec 21, 2015 at 04:35:23PM +0200, Saeed Mahameed wrote: >> think of a case where: >> CPU1: is just about to call >> "schedule_delayed_work(&tstamp->overflow_work, >> tstamp->overflow_period);" >> CPU2: cancel_delayed_work >> >> In this case cancel_dalyed_work_sync (CPU2) will wait for CPU1 to >> complete but CPU1 will re-arm the work, and we will >> be left with tstamp->overflow_work running forever. > > This is my understanding: Once the work becomes re-queued, it will be > canceled before running again. True, will fix this. Thanks > > Thanks, > Richard >