dmaengine Archive mirror
 help / color / mirror / Atom feed
From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: "Yu, Fenghua" <fenghua.yu@intel.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Zhu, Tony" <tony.zhu@intel.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: RE: [PATCH] dmaengine: idxd: Change wmb() to smp_wmb() when copying completion record to user space
Date: Wed, 31 Jan 2024 04:18:41 +0000	[thread overview]
Message-ID: <CO6PR11MB55868C091A77D9D5451D959A9C7C2@CO6PR11MB5586.namprd11.prod.outlook.com> (raw)
In-Reply-To: <c6c45aca-e8b9-f10e-181a-f0ca8a79a64c@intel.com>



> -----Original Message-----
> From: Yu, Fenghua <fenghua.yu@intel.com>
> Sent: Wednesday, January 31, 2024 2:12 AM
> To: Hansen, Dave <dave.hansen@intel.com>; Boqun Feng
> <boqun.feng@gmail.com>; Mark Rutland <mark.rutland@arm.com>
> Cc: Vinod Koul <vkoul@kernel.org>; Jiang, Dave <dave.jiang@intel.com>;
> dmaengine@vger.kernel.org; linux-kernel <linux-kernel@vger.kernel.org>; Rao,
> Nikhil <nikhil.rao@intel.com>; Zhu, Tony <tony.zhu@intel.com>; Mathieu
> Desnoyers <mathieu.desnoyers@efficios.com>; Thomas Gleixner
> <tglx@linutronix.de>; Ingo Molnar <mingo@redhat.com>; Borislav Petkov
> <bp@alien8.de>; Dave Hansen <dave.hansen@linux.intel.com>;
> x86@kernel.org
> Subject: Re: [PATCH] dmaengine: idxd: Change wmb() to smp_wmb() when
> copying completion record to user space
> 
> Hi, Dave, Boqun, and Mark,
> 
> On 1/30/24 12:30, Dave Hansen wrote:
> > On 1/30/24 11:53, Boqun Feng wrote:
> >>>> Fixes: b022f59725f0 ("dmaengine: idxd: add idxd_copy_cr() to copy
> >>>> user completion record during page fault handling")
> >>>> Suggested-by: Nikhil Rao <nikhil.rao@intel.com>
> >>>> Tested-by: Tony Zhu <tony.zhu@intel.com>
> >> Since it has a "Fixes" tag and a "Tested-by" tag, I'd assume there
> >> has been a test w/ and w/o this patch showing it can resolve a real
> >> issue *constantly*? If so, I think x86 might be broken somewhere.
> >>
> >> [Cc x86 maintainers]
> >
> > Fenghua, could you perhaps explain how this problem affects end users?
> > What symptom was observed that made it obvious something was broken
> > and what changes with this patch?
> 
> There is no issue found by any test. This wmb() code was reviewed and was
> "thought" that it may have a potential issue. 

I had made this suggestion since the code only needed a smp_wmb(), If the review refers to my suggestion, sorry if my message indicated a potential issue, that certainly wasn't my intention.
memory-barriers.txt does say that mandatory barriers (of which wmb() is one) should not be used to control SMP effects.

Nikhil

      reply	other threads:[~2024-01-31  4:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  2:58 [PATCH] dmaengine: idxd: Change wmb() to smp_wmb() when copying completion record to user space Fenghua Yu
2024-01-30 15:35 ` Dave Jiang
2024-01-30 16:01 ` Lijun Pan
2024-01-30 17:58 ` Mark Rutland
2024-01-30 18:14   ` Mark Rutland
2024-01-30 19:53   ` Boqun Feng
2024-01-30 20:30     ` Dave Hansen
2024-01-30 20:41       ` Fenghua Yu
2024-01-31  4:18         ` Rao, Nikhil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR11MB55868C091A77D9D5451D959A9C7C2@CO6PR11MB5586.namprd11.prod.outlook.com \
    --to=nikhil.rao@intel.com \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.zhu@intel.com \
    --cc=vkoul@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).