linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: David Laight <David.Laight@ACULAB.COM>,
	Vaibhav Jain <vaibhav@linux.vnet.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: Frank Haverkamp <HAVERKAM@de.ibm.com>,
	"Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
	"imunsie@au1.ibm.com" <imunsie@au1.ibm.com>
Subject: Re: cxl: Fix DSI misses when the context owning task exits
Date: Wed, 13 Jan 2016 09:59:42 +1100	[thread overview]
Message-ID: <1452639582.14097.2.camel@ellerman.id.au> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CCC4462@AcuExch.aculab.com>

On Tue, 2016-01-12 at 13:29 +0000, David Laight wrote:
> From: Michael Ellerman
> > Sent: 11 January 2016 09:14
> > On Tue, 2015-24-11 at 10:56:18 UTC, Vaibhav Jain wrote:
> > > Presently when a user-space process issues CXL_IOCTL_START_WORK ioctl we
> > > store the pid of the current task_struct and use it to get pointer to
> > > the mm_struct of the process, while processing page or segment faults
> > > from the capi card. However this causes issues when the thread that had
> > > originally issued the start-work ioctl exits in which case the stored
> > > pid is no more valid and the cxl driver is unable to handle faults as
> > > the mm_struct corresponding to process is no more accessible.
> > > 
> > > This patch fixes this issue by using the mm_struct of the next alive
> > > task in the thread group. This is done by iterating over all the tasks
> > > in the thread group starting from thread group leader and calling
> > > get_task_mm on each one of them. When a valid mm_struct is obtained the
> > > pid of the associated task is stored in the context replacing the
> > > exiting one for handling future faults.
> 
> I don't even claim to understand the linux model for handling process
> address maps, nor what the cxl driver is doing, but the above looks
> more than dodgy.

Thanks for reviewing it!

cheers

  reply	other threads:[~2016-01-12 22:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 10:56 [PATCH] cxl: Fix DSI misses when the context owning task exits Vaibhav Jain
2015-11-25  2:05 ` Ian Munsie
2015-11-25  8:57 ` Frederic Barrat
2015-11-25 16:17 ` Matthew R. Ochs
2016-01-11  9:14 ` Michael Ellerman
2016-01-12 13:29   ` David Laight
2016-01-12 22:59     ` Michael Ellerman [this message]
2016-01-14  7:50     ` Vaibhav Jain
2016-01-14 10:11       ` David Laight

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=1452639582.14097.2.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=David.Laight@ACULAB.COM \
    --cc=HAVERKAM@de.ibm.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mrochs@linux.vnet.ibm.com \
    --cc=vaibhav@linux.vnet.ibm.com \
    /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 NNTP newsgroup(s).