public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Frederic Barrat <fbarrat@linux•vnet.ibm.com>,
	linuxppc-dev@lists•ozlabs.org, benh@kernel•crashing.org,
	andrew.donnellan@au1•ibm.com, clombard@linux•vnet.ibm.com,
	vaibhav@linux•vnet.ibm.com
Cc: alistair@popple•id.au
Subject: Re: [v2,2/3] cxl: Fix driver use count
Date: Thu, 31 Aug 2017 21:36:32 +1000 (AEST)	[thread overview]
Message-ID: <3xjgLm4Sn9z9t45@ozlabs.org> (raw)
In-Reply-To: <20170830101550.16821-2-fbarrat@linux.vnet.ibm.com>

On Wed, 2017-08-30 at 10:15:49 UTC, Frederic Barrat wrote:
> cxl keeps a driver use count, which is used with the hash memory model
> on p8 to know when to upgrade local TLBIs to global and to trigger
> callbacks to manage the MMU for PSL8.
> 
> If a process opens a context and closes without attaching or fails the
> attachment, the driver use count is never decremented. As a
> consequence, TLB invalidations remain global, even if there are no
> active cxl contexts.
> 
> We should increment the driver use count when the process is attaching
> to the cxl adapter, and not on open. It's not needed before the
> adapter starts using the context and the use count is decremented on
> the detach path, so it makes more sense.
> 
> It affects only the user api. The kernel api is already doing The
> Right Thing.
> 
> Signed-off-by: Frederic Barrat <fbarrat@linux•vnet.ibm.com>
> Cc: stable@vger•kernel.org # v4.2+
> Fixes: 7bb5d91a4dda ("cxl: Rework context lifetimes")
> Acked-by: Andrew Donnellan <andrew.donnellan@au1•ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/197267d0356004a31c4d6b6336598f

cheers

  parent reply	other threads:[~2017-08-31 11:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 10:15 [PATCH v2 1/3] powerpc/mm: Export flush_all_mm() Frederic Barrat
2017-08-30 10:15 ` [PATCH v2 2/3] cxl: Fix driver use count Frederic Barrat
2017-08-30 13:18   ` Michael Ellerman
2017-08-31 11:36   ` Michael Ellerman [this message]
2017-08-30 10:15 ` [PATCH v2 3/3] cxl: Enable global TLBIs for cxl contexts Frederic Barrat
2017-08-30 13:17 ` [PATCH v2 1/3] powerpc/mm: Export flush_all_mm() Michael Ellerman
2017-08-30 13:59   ` Frederic Barrat
2017-08-30 21:01     ` Benjamin Herrenschmidt
2017-08-31  9:13       ` Frederic Barrat
2017-08-30 21:00   ` Benjamin Herrenschmidt

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=3xjgLm4Sn9z9t45@ozlabs.org \
    --to=patch-notifications@ellerman$(echo .)id.au \
    --cc=alistair@popple$(echo .)id.au \
    --cc=andrew.donnellan@au1$(echo .)ibm.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=clombard@linux$(echo .)vnet.ibm.com \
    --cc=fbarrat@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=vaibhav@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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