Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp477657imm; Fri, 11 May 2018 01:07:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo/SXs3+Z9yqPL9XX4UdM10/Ot3glztzzaYupFz3qgKRSK+CzdH7Gv4R+eDveyuNXWJCZET X-Received: by 2002:a17:902:7441:: with SMTP id e1-v6mr4461926plt.238.1526026064602; Fri, 11 May 2018 01:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526026064; cv=none; d=google.com; s=arc-20160816; b=Z28Ng+7AxXC2rFMB8wf1hGysp4nV57g2jJFTrh/Ot8DNL2ldD1StcsRvGMKS8vQqRp FH4TspVxfgMm5Ke4/6jcvOZ43yNr+Z8AjpHLx8aY2sIJNbPdo0/DXLFura+4hNfwju/x pV9oxS8Yd4EQ2EPJiHhN9Odt1AY5+X/+yuzZ7X8r2Vx3jwg8A/S4rpZBc/JmIKSevkv7 DCRgStDvXMVXyiaWCyujiIwOgDr2BENi/htk0ou0RFz6LZgxsZ9OMkA5WHu44FWibfI8 FbLUnAUaXKALWO+6W52UtKjE7QZIqIxriesJSeyDguShBQy7tcyFkwz2Q7PrPzW2IO2U Ycow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=dhikODxQDhnHbutBW2QmBn1mlnL6HuF4NFnghU0K7ho=; b=Z505m8oGfA1Ycr0RqBT6wDxLGOISovKIgY/AoHBO6On2hLrYs2BafocXV0P9GmNvKg clWckz+dDpi293yQrKFTgeYgxXSU8WaCvHjbB2WCo7AUKJpxpJuaSLF20xBnABNdS+Mt hYXSn8LoTj6jHh9AkjaocQf8j4btLg9YtGm+Ak0S12ubjqDVwTegDOq336nnUoVpO1tz hiwu+zwNFwzjFxK+9ElyHQRxF+TVL0hT5z43rosKnaDNalKP4v+/0uM7ltYV+AeG9lqk nc3qwAnXaU2fWWn7H47kvOganY5/Yath/ZsCvXEJq5w+xbtkI37EV5baYCQHPUaQPoZx KBaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si2858895pla.345.2018.05.11.01.07.30; Fri, 11 May 2018 01:07:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbeEKIBO (ORCPT + 99 others); Fri, 11 May 2018 04:01:14 -0400 Received: from www84.your-server.de ([213.133.104.84]:49589 "EHLO www84.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752174AbeEKIBK (ORCPT ); Fri, 11 May 2018 04:01:10 -0400 X-Greylist: delayed 1677 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 May 2018 04:01:10 EDT Received: from [188.192.74.68] (helo=skynet.local) by www84.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fH2YA-0002YS-3J; Fri, 11 May 2018 09:33:10 +0200 Message-ID: <1526023986.28429.1.camel@seibold.net> Subject: Re: Is read barrier missed in kfifo? From: Stefani Seibold To: Xiao Guangrong , paulmck@linux.vnet.ibm.com Cc: peterz@infradead.org, rostedt@goodmis.org, Lai Jiangshan , "linux-kernel@vger.kernel.org" Date: Fri, 11 May 2018 09:33:06 +0200 In-Reply-To: <5382d3a8-08e0-5429-0cd3-36f9c69197e1@gmail.com> References: <5382d3a8-08e0-5429-0cd3-36f9c69197e1@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: stefani@seibold.net X-Virus-Scanned: Clear (ClamAV 0.99.3/24559/Fri May 11 06:34:19 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org My guts thinks you are right. Feel free to send a patch... Am Freitag, den 11.05.2018, 15:25 +0800 schrieb Xiao Guangrong: > Hi, > > Currently, there is no read barrier between reading the index > (kfifo.in) and fetching the real data from the fifo. > > I am afraid that will cause the vfifo is observed as not empty > however the data is not actually ready for read. Right? > > Thanks!