Re: [PATCH 02/24] io-controller: Core of the elevator fair queuing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19, 2009 at 06:01:34PM +0200, Jerome Marchand wrote:
> Hi Vivek,
> 
> Vivek Goyal wrote:
> > o This is core of the io scheduler implemented at elevator layer. This is a mix
> >   of cpu CFS scheduler and CFQ IO scheduler. Some of the bits from CFS have
> >   to be derived so that we can support hierarchical scheduling. Without
> >   cgroups or with-in group, we should essentially get same behavior as CFQ.
> > 
> > o This patch only shows non-hierarchical bits. Hierarhical code comes in later
> >   patches.
> > 
> > o This code is the building base of introducing fair queuing logic in common
> >   elevator layer so that it can be used by all the four IO schedulers.
> 
> > +static void enqueue_io_entity(struct io_entity *entity)
> > +{
> > +	struct io_service_tree *st = entity->st;
> > +	struct io_sched_data *sd = io_entity_sched_data(entity);
> > +
> > +	/* In case task ioprio class changed while entity was off tree */
> > +	io_entity_update_prio(entity);
> > +	st->nr_active++;
> > +	sd->nr_active++;
> > +	entity->on_st = 1;
> > +	place_entity(st, entity, 0);
> > +	__enqueue_io_entity(st, entity);
> > +}
> 
> > +static void put_prev_io_entity(struct io_entity *entity)
> > +{
> > +	struct io_service_tree *st = entity->st;
> > +	struct io_sched_data *sd = io_entity_sched_data(entity);
> > +
> > +	st->active_entity = NULL;
> > +	sd->active_entity = NULL;
> > +
> > +	if (unlikely(entity->ioprio_changed)) {
> > +		dequeue_io_entity(entity);
> > +		io_entity_update_prio(entity);
> 
> That call to io_entity_update_prio() looks redundant with the one in
> enqueue_io_entity().
> 

thanks Jerome. Yes it does look like a redundant call. Will get rid of it
in next posting.

Vivek

> > +		enqueue_io_entity(entity);
> > +	} else
> > +		__enqueue_io_entity(st, entity);
> > +}
> 
> Jerome

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux