From: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
To: "cl@gentwo.org" <cl@gentwo.org>,
"tursulin@ursulin.net" <tursulin@ursulin.net>,
"Nikula, Jani" <jani.nikula@intel.com>,
"Shyti, Andi" <andi.shyti@intel.com>,
"Wilson, Chris P" <chris.p.wilson@intel.com>,
"Brost, Matthew" <matthew.brost@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"will@kernel.org" <will@kernel.org>,
"Lahtinen, Joonas" <joonas.lahtinen@intel.com>
Cc: lkp <lkp@intel.com>,
"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"boqun.feng@gmail.com" <boqun.feng@gmail.com>,
"longman@redhat.com" <longman@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devnull+cl.gentwo.org@kernel.org"
<devnull+cl.gentwo.org@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>
Subject: Re: [PATCH v3] Avoid memory barrier in read_seqcount() through load acquire
Date: Wed, 18 Sep 2024 00:45:56 +0000 [thread overview]
Message-ID: <38ef8fac250e9e2591df8e949d5638e5c4abf2ad.camel@intel.com> (raw)
In-Reply-To: <87r09i1ou6.ffs@tglx>
On Tue, 2024-09-17 at 13:50 +0200, Thomas Gleixner wrote:
> Cc+ i915 people
>
> On Tue, Sep 17 2024 at 08:37, Will Deacon wrote:
> > On Mon, Sep 16, 2024 at 10:52:18AM -0700, Christoph Lameter
> > (Ampere) wrote:
> > > On Fri, 13 Sep 2024, kernel test robot wrote:
> > >
> > > > > > drivers/gpu/drm/i915/gt/intel_tlb.h:21:47: error: macro
> > > > > > "seqprop_sequence" requires 2 arguments, but only 1 given
> > >
> > > From 15d86bc9589f16947c5fb0f34d2947eacd48f853 Mon Sep 17 00:00:00
> > > 2001
> > > From: Christoph Lameter <cl@gentwo.org>
> > > Date: Mon, 16 Sep 2024 10:44:16 -0700
> > > Subject: [PATCH] Update Intel DRM use of seqprop_sequence
> > >
> > > One of Intels drivers uses seqprop_sequence() for its tlb
> > > sequencing.
> > > We added a parameter so that we can use acquire. Its pretty safe
> > > to
> > > assume that this will work without acquire.
> > >
> > > Signed-off-by: Christoph Lameter <cl@linux.com>
> > > ---
> > > drivers/gpu/drm/i915/gt/intel_tlb.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gt/intel_tlb.h
> > > b/drivers/gpu/drm/i915/gt/intel_tlb.h
> > > index 337327af92ac..81998c4cd4fb 100644
> > > --- a/drivers/gpu/drm/i915/gt/intel_tlb.h
> > > +++ b/drivers/gpu/drm/i915/gt/intel_tlb.h
> > > @@ -18,7 +18,7 @@ void intel_gt_fini_tlb(struct intel_gt *gt);
> > >
> > > static inline u32 intel_gt_tlb_seqno(const struct intel_gt *gt)
> > > {
> > > - return seqprop_sequence(>->tlb.seqno);
> > > + return seqprop_sequence(>->tlb.seqno, false);
> > > }
> >
> > Yikes, why is the driver using the seqlock internals here? It's a
> > bit of
> > a pity, as a quick grep suggest that this is the _only_ user of
> > 'seqcount_mutex_t', yet it's still having to work around the API.
>
> Why the hell can't i915 use the proper interfaces and has to bypass
> the
> core code? Just because C allows that does not make it correct.
>
> Can the i915 people please remove this blatant violation of layering?
Yeap, we gotta remove this. Just need to be careful on this TLB
invalidation code without causing some funny deadlocks...
>
> Thanks,
>
> tglx
>
next prev parent reply other threads:[~2024-09-18 0:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 22:44 Christoph Lameter via B4 Relay
2024-09-13 13:41 ` kernel test robot
2024-09-16 17:52 ` Christoph Lameter (Ampere)
2024-09-17 7:37 ` Will Deacon
2024-09-17 11:50 ` Thomas Gleixner
2024-09-18 0:45 ` Vivi, Rodrigo [this message]
2024-09-13 13:41 ` kernel test robot
2024-09-17 7:12 ` Will Deacon
2024-09-18 11:03 ` Christoph Lameter (Ampere)
2024-09-18 15:22 ` Linus Torvalds
2024-09-23 16:28 ` Linus Torvalds
2024-10-23 19:45 ` Peter Zijlstra
2024-10-23 20:34 ` Linus Torvalds
2024-10-28 14:10 ` Will Deacon
2024-10-23 23:42 ` Christoph Lameter (Ampere)
2024-10-25 7:42 ` Peter Zijlstra
2024-10-25 19:30 ` Christoph Lameter (Ampere)
2024-09-17 11:52 ` Thomas Gleixner
2024-09-18 11:11 ` Christoph Lameter (Ampere)
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=38ef8fac250e9e2591df8e949d5638e5c4abf2ad.camel@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=andi.shyti@intel.com \
--cc=boqun.feng@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=chris.p.wilson@intel.com \
--cc=cl@gentwo.org \
--cc=devnull+cl.gentwo.org@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=longman@redhat.com \
--cc=matthew.brost@intel.com \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tursulin@ursulin.net \
--cc=will@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