From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31EE51BD9C2 for ; Fri, 3 Jan 2025 22:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735942702; cv=none; b=prChHJNILSefx1xMWeBQWiuFi9FCEeIEgAkFu8O5viTs5QTNbXDN0T56sJuWG7N15c+UGiD0u6cnM1PLf6ItqpbrtlhZr+TEpLhNBUfPnlYy2N5BZrQVT8ZB0HQQ/yFA5iYYwDwoVSE9+gIHm0xWscfnU+uRDJX4FXXmzfrMu3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735942702; c=relaxed/simple; bh=MlnqJdGNWpqPZUUKRD8NAt64Nxx5BbFTjPWVTj3yGWw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i1vn8FeeNKZLS1CF39pDC+ryB7bKHEIMfiUL1Zro8nNY6rsO0fAnYOVW+vi/jqrOPqXNLoyW5LhAz4jidJCY4q08ADneyCoaN2RqUbo0YSQ2NnNXhkRzMRpRd36XT4QYIvrCyjCsVPUitobzTpjIy8/JWn7/1v0eD4m+bDbxn6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uwrrRKvm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uwrrRKvm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83C7CC4CECE; Fri, 3 Jan 2025 22:18:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735942701; bh=MlnqJdGNWpqPZUUKRD8NAt64Nxx5BbFTjPWVTj3yGWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uwrrRKvmkr9vTyNLeNdLUE1AExnljKMmVWnUBx5XbHr7rPXaj07+ntxCj+kNIVluf M9c4cagdluTONCZS5XeU8GacVyu9CFDXHLZ8ucnVZ5zRBlSJItbCFU1fs3UPiP0cPM hlic7ElDc4BBQi+T2sEV9vOY/AOHOQsU6WelZkop7CByYKDqCjMbbzBWqVZBhBDeO9 Rb6WjhB98W9oakj/ZZvvKhYZi+pUSPsjoOD8Q5iwpCKil7bMJkw6z54Rv4wtiqApr2 wdnEvR9/Ur15cATG/23QSWQMZoWUyl6JysHkJXzTp6NQalF7wv1ukfYO/22aEps8IB GlJsu+F/9QGGw== Date: Fri, 3 Jan 2025 12:18:20 -1000 From: Tejun Heo To: Imran Khan Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] workqueue: introduce WORK_STRUCT_TIMER_PENDING_BIT. Message-ID: References: <20241230064500.1404206-1-imran.f.khan@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241230064500.1404206-1-imran.f.khan@oracle.com> Hello, On Mon, Dec 30, 2024 at 05:45:00PM +1100, Imran Khan wrote: > Currently WORK_STRUCT_PENDING_BIT can indicate a work_struct that is > already made it to work list of a worker_pool or a work_struct that has > not yet made it there because it comes from a delayed_work whose timer > has not expired yet. > > Use WORK_STRUCT_TIMER_PENDING_BIT to distinguish between these two > states of work_struct. > > Signed-off-by: Imran Khan > --- > I have kept the patch as RFC, because this change is not fixing a bug. > It makes WORK_STRUCT_PENDING_BIT less ambiguous and helps in debugging, > by indicating where one should look for this pending work. But can't you already tell this by looking at the work struct? I'm not sure about adding more atomic ops for redundant information. Thanks. -- tejun