Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp852837pxb; Fri, 22 Apr 2022 12:38:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLqldtSqAsp8rkT8NcvjEpObkole7M2zOa/bOQNh4S8AbwwBBVRVHDkYRYR3MbkhSke+x6 X-Received: by 2002:a63:9253:0:b0:3aa:55f3:346d with SMTP id s19-20020a639253000000b003aa55f3346dmr5147254pgn.210.1650656297167; Fri, 22 Apr 2022 12:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650656297; cv=none; d=google.com; s=arc-20160816; b=q9fOa3jkQVAlZjWiRwdPqEilq53K57yb01cD21qSPLiJgZq92XgLnHrbK7koL8sZvS 9VHJyi0keJNBGKhnOWPXJ2PXx8v89Cz/ePiY8WKTkdSRulBL/UY/KG44rCJLlWk0EKYZ SyyrWZs+PeuFE1cdUROQxsCyR8DSeWuasZikPRZEzYPhApbrhImDkYqPr0XgAgCHhIF/ 7XczseZ6WGtRyL+/FRJp6yVVXHyg76Q8xc6Y8bV4jXWXWrKwe80tt+hZMPvdtJ9l8omt aecr0iodIOfE6+W3KzsmlvpjXID+8dloygV0jxoRRnGtsG6OceXMITnTRFKMGW00mhRv Mf2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b/mzIHtYOca9ivGkXcLop9wA8toChfAbWT0m3l15a+g=; b=bnZUHMqEMYVOWfPInB62boKYdayJc85+zZqNxNOsHtEcClU6dbvRELizgUNK8e8ZbM AxHAr5HQnOH85dxVE1ip6/Br0KaRqsFw2TzXBLYunkKsdD6tzaPVYbrI7tCtk3I0FGVQ LoIaKtu/0n2HnF9opbbd9+veU76C0oEENMy2FctiNShm1SpF+OE6XFQieU+mxHD6+pZG v63P2jbxyktDuSBKQZt/OmHWscgFd/p0tZ0XbtzGTzgHusx5v1bLFnbay7gpfBEXeu9z VpGlEUjJ4cpzrHppdBPOA6H4N6DV5qkHu+hFSz1X3JY+9DiuYzx4kqNTySjIDfXxSUAN SX0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=oC95MYYe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q11-20020a65494b000000b003a6d2c0b6f3si9044558pgs.573.2022.04.22.12.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:38:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=oC95MYYe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D280C1F6E4D; Fri, 22 Apr 2022 11:47:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378575AbiDTMhm (ORCPT + 99 others); Wed, 20 Apr 2022 08:37:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbiDTMhj (ORCPT ); Wed, 20 Apr 2022 08:37:39 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B24CD2 for ; Wed, 20 Apr 2022 05:34:53 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id DE45C1F380; Wed, 20 Apr 2022 12:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650458091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b/mzIHtYOca9ivGkXcLop9wA8toChfAbWT0m3l15a+g=; b=oC95MYYeoJbR9hKkj1VOb6aRZEanirfw5PTlbkD2ZXT+ouF1Aq3tf99fIKuLdgJfgkw3Re 7h+n0F2VHsTaB+6cSfXPP9dEVn7b7b/uKUyR155YRZXeLRhmRmFzN2Uz0nJl4smBOyybj3 LLp0kivQwr39ID2FqLidTgRJEfBrq2w= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id AA9A62C145; Wed, 20 Apr 2022 12:34:51 +0000 (UTC) Date: Wed, 20 Apr 2022 14:34:50 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk v3 03/15] printk: add missing memory barrier to wake_up_klogd() Message-ID: References: <20220419234637.357112-1-john.ogness@linutronix.de> <20220419234637.357112-4-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220419234637.357112-4-john.ogness@linutronix.de> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2022-04-20 01:52:25, John Ogness wrote: > It is important that any new records are visible to preparing > waiters before the waker checks if the wait queue is empty. > Otherwise it is possible that: > > - there are new records available > - the waker sees an empty wait queue and does not wake > - the preparing waiter sees no new records and begins to wait > > This is exactly the problem that the function description of > waitqueue_active() warns about. > > Use wq_has_sleeper() instead of waitqueue_active() because it > includes the necessary full memory barrier. > > Signed-off-by: John Ogness Great catch! Looks good to me. Reviewed-by: Petr Mladek Best Regards, Petr