mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@osadl.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux390@de.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH RFC] s390/sclp: pass timeout as HZ independent value
Date: Wed, 27 May 2015 19:04:43 +0200	[thread overview]
Message-ID: <1432746283-8068-1-git-send-email-hofrat@osadl.org> (raw)

schedule_timeout takes a timeout in jiffies but the code currently is
passing in a constant SDIAS_SLEEP_TICKS which sounds like it should be
in jiffies but it is actually not and thus makes this timeout HZ
dependent, to fix this it is passed through msecs_to_jiffies().

patch was not even compile tested as s390 toolchain from kernel.org 
failed for me (on a debian wheezy x86_64) with:
cc1: error: unrecognized command line option '-mtune=zEC12'

Patch is against 4.0-rc5 (localversion-next is -next-20150527)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

As there is no documentation of the intended timeout it might be wrong
to convert it with msecs_to_jiffies() since the effective timeout is 
at least a factor 10 smaller than it is now - so someone that knows this
driver needs to check on the actual value - but in any case it needs to
be passed in a HZ independent way.

 drivers/s390/char/sclp_sdias.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/char/sclp_sdias.c b/drivers/s390/char/sclp_sdias.c
index eb7cb07..ab92a75 100644
--- a/drivers/s390/char/sclp_sdias.c
+++ b/drivers/s390/char/sclp_sdias.c
@@ -68,7 +68,7 @@ static int sdias_sclp_send(struct sclp_req *req)
 			/* not initiated, wait some time and retry */
 			set_current_state(TASK_INTERRUPTIBLE);
 			TRACE("add request failed: rc = %i\n",rc);
-			schedule_timeout(SDIAS_SLEEP_TICKS);
+			schedule_timeout(msecs_to_jiffies(SDIAS_SLEEP_TICKS));
 			continue;
 		}
 		/* initiated, wait for completion of service call */
-- 
1.7.10.4


             reply	other threads:[~2015-05-27 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 17:04 Nicholas Mc Guire [this message]
2015-05-29  9:07 ` Heiko Carstens
2015-05-29  9:51   ` Nicholas Mc Guire
2015-05-29 10:35     ` Heiko Carstens
2015-05-29 11:49       ` Nicholas Mc Guire
2015-05-29 12:01         ` Michael Holzheu
2015-05-29 14:16           ` Nicholas Mc Guire
2015-05-29 14:36             ` Heiko Carstens
2015-05-29 14:43               ` Nicholas Mc Guire

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=1432746283-8068-1-git-send-email-hofrat@osadl.org \
    --to=hofrat@osadl.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=schwidefsky@de.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

all inboxes | Powered by JetHome®