All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
Cc: Oliver Neukum <oliver@neukum.org>,
	USB Developers <linux-usb-devel@lists.sourceforge.net>,
	Kernel Developer List <linux-kernel@vger.kernel.org>
Subject: Re: [linux-usb-devel] System stalls using usb-storage
Date: 27 Jul 2003 11:09:22 +0200	[thread overview]
Message-ID: <m27k64z67x.fsf@telia.com> (raw)
In-Reply-To: <20030726233545.B20751@one-eyed-alien.net>

Matthew Dharm <mdharm-kernel@one-eyed-alien.net> writes:

> On Sun, Jul 27, 2003 at 08:24:44AM +0200, Oliver Neukum wrote:
> > Am Donnerstag, 24. Juli 2003 05:00 schrieb Matthew Dharm:
> > > The question is, what is the best way to handle this.  I'm guessing that
> > > increasing the priority of the usb-storage control thread will help, but
> > > that's just a guess.  I'm not even sure how to go about doing that, tho...
> > 
> > A kernel thread in the block io path has to have a higher priority than
> > any user task. Otherwise a priority inversion is possible.
> 
> Reasonable.  So, other than renice at the command line, how does one go
> about setting this?

Try this patch. The loop device thread is doing the same thing.

diff -puN drivers/usb/storage/usb.c~usb-priority drivers/usb/storage/usb.c
--- linux/drivers/usb/storage/usb.c~usb-priority	Sun Jul 27 10:56:02 2003
+++ linux-petero/drivers/usb/storage/usb.c	Sun Jul 27 10:56:47 2003
@@ -302,6 +302,8 @@ static int usb_stor_control_thread(void 
 
 	current->flags |= PF_IOTHREAD;
 
+	set_user_nice(current, -20);
+
 	unlock_kernel();
 
 	/* signal that we've started the thread */

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340

      reply	other threads:[~2003-07-27  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24  3:00 System stalls using usb-storage Matthew Dharm
2003-07-27  6:24 ` [linux-usb-devel] " Oliver Neukum
2003-07-27  6:35   ` Matthew Dharm
2003-07-27  9:09     ` Peter Osterlund [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=m27k64z67x.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mdharm-kernel@one-eyed-alien.net \
    --cc=oliver@neukum.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.