Re: [PATCH 2/3] bfq: Avoid merging queues with different parents

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

 



On Fri 24-12-21 09:45:02, yukuai (C) wrote:
> 在 2021/12/24 1:31, Jan Kara 写道:
> > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> > index 056399185c2f..0da47f2ca781 100644
> > --- a/block/bfq-iosched.c
> > +++ b/block/bfq-iosched.c
> > @@ -2638,6 +2638,14 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
> >   	if (process_refs == 0 || new_process_refs == 0)
> >   		return NULL;
> > +	/*
> > +	 * Make sure merged queues belong to the same parent. Parents could
> > +	 * have changed since the time we decided the two queues are suitable
> > +	 * for merging.
> > +	 */
> > +	if (new_bfqq->entity.parent != bfqq->entity.parent)
> > +		return NULL;
> > +
> Hi,
> 
> This seems unnecessary, the caller of bfq_setup_merge() aready make sure
> bfqq and new_bfqq are under the same bfqg. Am I missing something?

Not all the callers of bfq_setup_merge() check that queues belong to the
same cgroup (e.g. bfq_setup_cooperator() does not seem to check).

								Honza

> 
> Thanks,
> Kuai
> >   	bfq_log_bfqq(bfqq->bfqd, bfqq, "scheduling merge with queue %d",
> >   		new_bfqq->pid);
> > 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux