From: Pierre Morel <pmorel@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Pierre Morel <pmorel@linux.vnet.ibm.com>,
pasic@linux.vnet.ibm.com, bjsdjshi@linux.vnet.ibm.com,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 01/10] vfio: ccw: Moving state change out of IRQ context
Date: Tue, 5 Jun 2018 16:22:58 +0200 [thread overview]
Message-ID: <f17c58bd-b8ab-aeda-04af-db6ba64e87af@linux.ibm.com> (raw)
In-Reply-To: <20180605155231.7d4d3f96.cohuck@redhat.com>
On 05/06/2018 15:52, Cornelia Huck wrote:
> On Tue, 5 Jun 2018 15:34:52 +0200
> Pierre Morel <pmorel@linux.ibm.com> wrote:
>
>> On 04/06/2018 15:52, Cornelia Huck wrote:
>>> On Fri, 25 May 2018 12:21:09 +0200
>>> Pierre Morel <pmorel@linux.vnet.ibm.com> wrote:
>>>
>>>> Let's move the state change from the IRQ routine to the
>>>> workqueue callback.
>>>>
>>>> Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
>>>> ---
>>>> drivers/s390/cio/vfio_ccw_drv.c | 20 +++++++-------------
>>>> drivers/s390/cio/vfio_ccw_fsm.c | 14 ++++++++------
>>>> 2 files changed, 15 insertions(+), 19 deletions(-)
>>> This causes a change in behaviour for devices in the notoper state.
>>>
>>> Now:
>>> - vfio_ccw_sch_irq is called
>> This should not be done if the subchannel is not operational.
>>
>>> - via the state machine, disabling the subchannel is (re-)triggered
>> I removed the fsm_disabled_irq() callback from VFIO_CCW_STATE_NOT_OPER
>> because the subchannel is not even initialized at that moment.
>> We have no reference to the subchannel.
>>
>> In the previous driver NOT_OPER and STANDBY were quite the same.
>> Now NOT_OPER means "we can not operate on this sub channel"
>> because we do not have it in a correct state (no ISC, no mediated device,
>> the probe is not finiched)
>>
>> Now STANDBY means we have the device ready but is disabled.
>> In this case the software infrastructure is ready and if an interrupt comes
>> (what should not happen) we will disable the subchannel again.
>>
>>> With your patch:
>>> - the work function is queued in any case; eventually, it will change
>>> the device's state to idle (unless we don't have an mdev at that
>>> point in time)
>>> - completion is signaled
>>>
>>> I'm not sure that's what we want.
>>>
>> Yes it is queued in any case but the IRQ is really treated only if the
>> subchannel is in the right state (STANDBY, BUSY, IDLE and QUIESCING).
>>
>> In the NOT_OPER state we do not have the mdev not the driver initialized.
> But all of this is only true after the whole series has been applied,
> isn't it? Is there any way to do the changes without breaking things
> inbetween?
I will think about this.
May be just disable the all thing untill all patches applied?
>
> What would also be very helpful is a sketch of the state machine after
> your rework is done. Otherwise, this leaves me a bit unsure about the
> intended semantics if I just look at the individual patches.
>
Right, I must enhance the cover letter.
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
next prev parent reply other threads:[~2018-06-05 14:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 10:21 [PATCH v2 00/10] vfio: ccw: Refactoring the VFIO CCW state machine Pierre Morel
2018-05-25 10:21 ` [PATCH v2 01/10] vfio: ccw: Moving state change out of IRQ context Pierre Morel
2018-06-04 13:52 ` Cornelia Huck
2018-06-05 13:34 ` Pierre Morel
2018-06-05 13:52 ` Cornelia Huck
2018-06-05 14:22 ` Pierre Morel [this message]
2018-05-25 10:21 ` [PATCH v2 02/10] vfio: ccw: Transform FSM functions to return state Pierre Morel
2018-05-25 10:21 ` [PATCH v2 03/10] vfio: ccw: new SCH_EVENT event Pierre Morel
2018-05-25 10:21 ` [PATCH v2 04/10] vfio: ccw: replace IO_REQ event with SSCH_REQ event Pierre Morel
2018-05-25 10:21 ` [PATCH v2 05/10] vfio: ccw: Suppress unused event parameter Pierre Morel
2018-05-25 10:21 ` [PATCH v2 06/10] vfio: ccw: Make FSM functions atomic Pierre Morel
2018-06-05 11:38 ` Cornelia Huck
2018-06-05 13:10 ` Pierre Morel
2018-06-05 13:35 ` Cornelia Huck
2018-06-05 14:21 ` Pierre Morel
2018-06-05 15:15 ` Cornelia Huck
2018-05-25 10:21 ` [PATCH v2 07/10] vfio: ccw: FSM and mediated device initialization Pierre Morel
2018-05-25 10:21 ` [PATCH v2 08/10] vfio: ccw: Handling reset and shutdown with states Pierre Morel
2018-06-05 12:18 ` Cornelia Huck
2018-06-05 14:10 ` Pierre Morel
2018-06-05 15:27 ` Cornelia Huck
2018-06-05 16:40 ` Pierre Morel
2018-05-25 10:21 ` [PATCH v2 09/10] vfio: ccw: Suppressing the BOXED state Pierre Morel
2018-05-25 10:21 ` [PATCH v2 10/10] vfio: ccw: Let user wait when busy on IO Pierre Morel
2018-05-25 14:04 ` Heiko Carstens
2018-06-05 13:02 ` Pierre Morel
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=f17c58bd-b8ab-aeda-04af-db6ba64e87af@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=bjsdjshi@linux.vnet.ibm.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.vnet.ibm.com \
--cc=pmorel@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).