Message ID | 1616665147-32084-5-git-send-email-pmorel@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Testing SSCH, CSCH and HSCH for errors | expand |
On Thu, 25 Mar 2021 10:39:03 +0100 Pierre Morel <pmorel@linux.ibm.com> wrote: > We will may want to check the result of an I/O without waiting > for an interrupt. > For example because we do not handle interrupt. > Let's separate waiting for interrupt and the I/O complretion check. ^^^^^^^^^^^ completion > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > --- > lib/s390x/css.h | 1 + > lib/s390x/css_lib.c | 13 ++++++++++--- > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/lib/s390x/css.h b/lib/s390x/css.h > index 0058355..5d1e1f0 100644 > --- a/lib/s390x/css.h > +++ b/lib/s390x/css.h > @@ -317,6 +317,7 @@ int css_residual_count(unsigned int schid); > > void enable_io_isc(uint8_t isc); > int wait_and_check_io_completion(int schid); > +int check_io_completion(int schid); > > /* > * CHSC definitions > diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c > index f5c4f37..1e5c409 100644 > --- a/lib/s390x/css_lib.c > +++ b/lib/s390x/css_lib.c > @@ -487,18 +487,25 @@ struct ccw1 *ccw_alloc(int code, void *data, > int count, unsigned char flags) } > > /* wait_and_check_io_completion: > + * @schid: the subchannel ID > + */ > +int wait_and_check_io_completion(int schid) > +{ > + wait_for_interrupt(PSW_MASK_IO); > + return check_io_completion(schid); > +} > + > +/* check_io_completion: > * @schid: the subchannel ID > * > * Makes the most common check to validate a successful I/O > * completion. > * Only report failures. > */ > -int wait_and_check_io_completion(int schid) > +int check_io_completion(int schid) > { > int ret = 0; > > - wait_for_interrupt(PSW_MASK_IO); > - > report_prefix_push("check I/O completion"); > > if (lowcore_ptr->io_int_param != schid) {
On 3/25/21 4:24 PM, Claudio Imbrenda wrote: > On Thu, 25 Mar 2021 10:39:03 +0100 > Pierre Morel <pmorel@linux.ibm.com> wrote: > >> We will may want to check the result of an I/O without waiting >> for an interrupt. >> For example because we do not handle interrupt. >> Let's separate waiting for interrupt and the I/O complretion check. > ^^^^^^^^^^^ > completion completed :) > >> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> > > Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Thanks, Pierre
On 25/03/2021 10.39, Pierre Morel wrote: > We will may want to check the result of an I/O without waiting > for an interrupt. > For example because we do not handle interrupt. > Let's separate waiting for interrupt and the I/O complretion check. > > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> > --- > lib/s390x/css.h | 1 + > lib/s390x/css_lib.c | 13 ++++++++++--- > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/lib/s390x/css.h b/lib/s390x/css.h > index 0058355..5d1e1f0 100644 > --- a/lib/s390x/css.h > +++ b/lib/s390x/css.h > @@ -317,6 +317,7 @@ int css_residual_count(unsigned int schid); > > void enable_io_isc(uint8_t isc); > int wait_and_check_io_completion(int schid); > +int check_io_completion(int schid); > > /* > * CHSC definitions > diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c > index f5c4f37..1e5c409 100644 > --- a/lib/s390x/css_lib.c > +++ b/lib/s390x/css_lib.c > @@ -487,18 +487,25 @@ struct ccw1 *ccw_alloc(int code, void *data, int count, unsigned char flags) > } > > /* wait_and_check_io_completion: > + * @schid: the subchannel ID > + */ > +int wait_and_check_io_completion(int schid) > +{ > + wait_for_interrupt(PSW_MASK_IO); > + return check_io_completion(schid); > +} > + > +/* check_io_completion: > * @schid: the subchannel ID > * > * Makes the most common check to validate a successful I/O > * completion. > * Only report failures. > */ > -int wait_and_check_io_completion(int schid) > +int check_io_completion(int schid) > { > int ret = 0; > > - wait_for_interrupt(PSW_MASK_IO); > - > report_prefix_push("check I/O completion"); > > if (lowcore_ptr->io_int_param != schid) { > Reviewed-by: Thomas Huth <thuth@redhat.com>
On 3/29/21 10:21 AM, Thomas Huth wrote: > On 25/03/2021 10.39, Pierre Morel wrote: >> We will may want to check the result of an I/O without waiting >> for an interrupt. >> For example because we do not handle interrupt. >> Let's separate waiting for interrupt and the I/O complretion check. >> >> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> >> --- >> lib/s390x/css.h | 1 + >> lib/s390x/css_lib.c | 13 ++++++++++--- >> 2 files changed, 11 insertions(+), 3 deletions(-) >> >> diff --git a/lib/s390x/css.h b/lib/s390x/css.h >> index 0058355..5d1e1f0 100644 >> --- a/lib/s390x/css.h >> +++ b/lib/s390x/css.h >> @@ -317,6 +317,7 @@ int css_residual_count(unsigned int schid); >> void enable_io_isc(uint8_t isc); >> int wait_and_check_io_completion(int schid); >> +int check_io_completion(int schid); >> /* >> * CHSC definitions >> diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c >> index f5c4f37..1e5c409 100644 >> --- a/lib/s390x/css_lib.c >> +++ b/lib/s390x/css_lib.c >> @@ -487,18 +487,25 @@ struct ccw1 *ccw_alloc(int code, void *data, int >> count, unsigned char flags) >> } >> /* wait_and_check_io_completion: >> + * @schid: the subchannel ID >> + */ >> +int wait_and_check_io_completion(int schid) >> +{ >> + wait_for_interrupt(PSW_MASK_IO); >> + return check_io_completion(schid); >> +} >> + >> +/* check_io_completion: >> * @schid: the subchannel ID >> * >> * Makes the most common check to validate a successful I/O >> * completion. >> * Only report failures. >> */ >> -int wait_and_check_io_completion(int schid) >> +int check_io_completion(int schid) >> { >> int ret = 0; >> - wait_for_interrupt(PSW_MASK_IO); >> - >> report_prefix_push("check I/O completion"); >> if (lowcore_ptr->io_int_param != schid) { >> > > Reviewed-by: Thomas Huth <thuth@redhat.com> > Thanks, Pierre
On Thu, 25 Mar 2021 10:39:03 +0100 Pierre Morel <pmorel@linux.ibm.com> wrote: > We will may want to check the result of an I/O without waiting > for an interrupt. > For example because we do not handle interrupt. It's more because we may poll the subchannel state without enabling I/O interrupts, no? > Let's separate waiting for interrupt and the I/O complretion check. > > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> > --- > lib/s390x/css.h | 1 + > lib/s390x/css_lib.c | 13 ++++++++++--- > 2 files changed, 11 insertions(+), 3 deletions(-) Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On 3/30/21 1:57 PM, Cornelia Huck wrote: > On Thu, 25 Mar 2021 10:39:03 +0100 > Pierre Morel <pmorel@linux.ibm.com> wrote: > >> We will may want to check the result of an I/O without waiting >> for an interrupt. >> For example because we do not handle interrupt. > > It's more because we may poll the subchannel state without enabling I/O > interrupts, no? absolutely. may be I just replace with your rewording :) " We will may want to check the result of an I/O without waiting for an interrupt because we may poll the subchannel state without enabling I/O interrupts. " > >> Let's separate waiting for interrupt and the I/O complretion check. >> >> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> >> --- >> lib/s390x/css.h | 1 + >> lib/s390x/css_lib.c | 13 ++++++++++--- >> 2 files changed, 11 insertions(+), 3 deletions(-) > > Reviewed-by: Cornelia Huck <cohuck@redhat.com> > Thanks, Pierre
On 3/25/21 10:39 AM, Pierre Morel wrote: > We will may want to check the result of an I/O without waiting > for an interrupt. > For example because we do not handle interrupt. > Let's separate waiting for interrupt and the I/O complretion check. > > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> > --- > lib/s390x/css.h | 1 + > lib/s390x/css_lib.c | 13 ++++++++++--- > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/lib/s390x/css.h b/lib/s390x/css.h > index 0058355..5d1e1f0 100644 > --- a/lib/s390x/css.h > +++ b/lib/s390x/css.h > @@ -317,6 +317,7 @@ int css_residual_count(unsigned int schid); > > void enable_io_isc(uint8_t isc); > int wait_and_check_io_completion(int schid); > +int check_io_completion(int schid); > > /* > * CHSC definitions > diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c > index f5c4f37..1e5c409 100644 > --- a/lib/s390x/css_lib.c > +++ b/lib/s390x/css_lib.c > @@ -487,18 +487,25 @@ struct ccw1 *ccw_alloc(int code, void *data, int count, unsigned char flags) > } > > /* wait_and_check_io_completion: > + * @schid: the subchannel ID > + */ > +int wait_and_check_io_completion(int schid) > +{ > + wait_for_interrupt(PSW_MASK_IO); > + return check_io_completion(schid); > +} > + > +/* check_io_completion: > * @schid: the subchannel ID > * > * Makes the most common check to validate a successful I/O > * completion. > * Only report failures. > */ > -int wait_and_check_io_completion(int schid) > +int check_io_completion(int schid) > { > int ret = 0; > > - wait_for_interrupt(PSW_MASK_IO); > - > report_prefix_push("check I/O completion"); > > if (lowcore_ptr->io_int_param != schid) { > Hum, sorry, it seems I forgot here --^ to move the check on io_int_param inside the interrupt routine. I change this for the next spin regards, Pierre
diff --git a/lib/s390x/css.h b/lib/s390x/css.h index 0058355..5d1e1f0 100644 --- a/lib/s390x/css.h +++ b/lib/s390x/css.h @@ -317,6 +317,7 @@ int css_residual_count(unsigned int schid); void enable_io_isc(uint8_t isc); int wait_and_check_io_completion(int schid); +int check_io_completion(int schid); /* * CHSC definitions diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c index f5c4f37..1e5c409 100644 --- a/lib/s390x/css_lib.c +++ b/lib/s390x/css_lib.c @@ -487,18 +487,25 @@ struct ccw1 *ccw_alloc(int code, void *data, int count, unsigned char flags) } /* wait_and_check_io_completion: + * @schid: the subchannel ID + */ +int wait_and_check_io_completion(int schid) +{ + wait_for_interrupt(PSW_MASK_IO); + return check_io_completion(schid); +} + +/* check_io_completion: * @schid: the subchannel ID * * Makes the most common check to validate a successful I/O * completion. * Only report failures. */ -int wait_and_check_io_completion(int schid) +int check_io_completion(int schid) { int ret = 0; - wait_for_interrupt(PSW_MASK_IO); - report_prefix_push("check I/O completion"); if (lowcore_ptr->io_int_param != schid) {
We will may want to check the result of an I/O without waiting for an interrupt. For example because we do not handle interrupt. Let's separate waiting for interrupt and the I/O complretion check. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> --- lib/s390x/css.h | 1 + lib/s390x/css_lib.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-)