lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081002134736.GH19428@kernel.dk>
Date:	Thu, 2 Oct 2008 15:47:37 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Dave Chinner <david@...morbit.com>,
	Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] Give kjournald a IOPRIO_CLASS_RT io priority

On Thu, Oct 02 2008, Arjan van de Ven wrote:
> On Thu, 2 Oct 2008 15:27:47 +0200
> Jens Axboe <jens.axboe@...cle.com> wrote:
> 
> > On Thu, Oct 02 2008, Arjan van de Ven wrote:
> > > On Thu, 2 Oct 2008 11:45:37 +0200
> > > Jens Axboe <jens.axboe@...cle.com> wrote:
> > > 
> > > > 
> > > > That's a good idea, just bump the priority a little bit. Arjan,
> > > > did you test that out? I'd suggest just trying prio level 0 and
> > > > still using best-effort scheduling. Probably still need the sync
> > > > marking, would be interesting to experiment with though.
> > > 
> > > I looked at 0 but it appears the 0 is the default for everyone...
> > > if everyone just defaulted to > 0 then yes I would have picked 0.
> > 
> > That's not correct, class BE and value 4 is the default (and the code
> > defaults to that, if you haven't set a value yourself):
> > 
> > #define IOPRIO_NORM     (4)
> > static inline int task_ioprio(struct io_context *ioc)
> > {
> >         if (ioprio_valid(ioc->ioprio))
> >                 return IOPRIO_PRIO_DATA(ioc->ioprio);
> > 
> >         return IOPRIO_NORM;
> > }
> > 
> > static inline int task_ioprio_class(struct io_context *ioc)
> > {
> >         if (ioprio_valid(ioc->ioprio))
> >                 return IOPRIO_PRIO_CLASS(ioc->ioprio);
> > 
> >         return IOPRIO_CLASS_BE;
> > }
> > 
> > So if you use IOPRIO_CLASS_BE and 0 for the ioprio, you will have the
> > highest priority of the default scheduling class.
> 
> ok
> 
> I checked not by looking at the code, but running ionice -p <pid> on a
> bunch of things and they came back as 0 

Yes, it'll report '0' which means 'not set'. The kernel inteprets 'not
set' as the default values, BE/4. There's a big diffence, since '0'
means that we track CPU nice values where as if it returned be/4 then
that is a strict/fixed setting.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ