linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Eric Farman <farman@linux.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH RFC UNTESTED] vfio-ccw: indirect access to translated cps
Date: Thu, 29 Aug 2019 19:41:58 +0200	[thread overview]
Message-ID: <20190829194158.094879b8.pasic@linux.ibm.com> (raw)
In-Reply-To: <20190828143947.1c6b88e4.cohuck@redhat.com>

On Wed, 28 Aug 2019 14:39:47 +0200
Cornelia Huck <cohuck@redhat.com> wrote:

> > > 
> > > So we do have three states here, right? (I hope we're not talking past
> > > each other again...)    
> > 
> > Right, AFAIR  and without any consideration to fine details the three
> > states and two state transitions do make sense.  
> 
> If we translate the three states to today's states in the fsm, we get:
> - "idle" -> VFIO_CCW_STATE_IDLE
> - "doing translation" -> VFIO_CCW_STATE_CP_PROCESSING
> - "submitted" -> VFIO_CCW_STATE_CP_PENDING
> and the transitions between the three already look fine to me (modulo
> locking). We also seem to handle async requests correctly (-EAGAIN if
> _PROCESSING, else just go ahead).
> 
> So we can probably forget about the approach in this patch, and
> concentrate on eliminating races in state transitions.

I agree.

> 
> Not sure what the best approach is for tackling these: intermediate
> transit state, a mutex or another lock, running locked and running
> stuff that cannot be done locked on workqueues (and wait for all work
> to finish while disallowing new work while doing the transition)?
> 
> Clever ideas wanted :)

AFAIR Eric has this problem on his TODO list. I think we can resume the
in depth discussion over his code :)

Regards,
Halil

      reply	other threads:[~2019-08-29 17:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 10:06 [PATCH RFC UNTESTED] vfio-ccw: indirect access to translated cps Cornelia Huck
2019-07-30 15:49 ` Halil Pasic
2019-08-07 11:23   ` Cornelia Huck
2019-08-07 14:01     ` Halil Pasic
2019-08-08  8:43       ` Cornelia Huck
2019-08-15 22:34         ` Halil Pasic
2019-08-16 18:21           ` Eric Farman
2019-08-28 12:39           ` Cornelia Huck
2019-08-29 17:41             ` Halil Pasic [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=20190829194158.094879b8.pasic@linux.ibm.com \
    --to=pasic@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.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 NNTP newsgroup(s).