Messages in this thread | | | From | Jeff Moyer <> | Subject | Re: [patch,rfc v2] ext3/4: enhance fsync performance when using cfq | Date | Thu, 08 Apr 2010 15:10:58 -0400 |
| |
Jens Axboe <jens.axboe@oracle.com> writes:
>> @@ -2065,7 +2065,7 @@ static void cfq_choose_cfqg(struct cfq_data *cfqd) >> cfqd->serving_group = cfqg; >> >> /* Restore the workload type data */ >> - if (cfqg->saved_workload_slice) { >> + if (cfqg && cfqg->saved_workload_slice) { >> cfqd->workload_expires = jiffies + cfqg->saved_workload_slice; >> cfqd->serving_type = cfqg->saved_workload; >> cfqd->serving_prio = cfqg->saved_serving_prio; > > Unrelated change?
Probably not needed for this incarnation of the patch, though previous iterations would Oops on boot w/o this. If you look through all of the code in this code path, cfqg == NULL seems to be handled, so it's probably safe to take this. I'll pull it out of this patch, though.
>> +static void cfq_yield(struct request_queue *q) >> +{ >> + struct cfq_data *cfqd = q->elevator->elevator_data; >> + struct cfq_io_context *cic; >> + struct cfq_queue *cfqq; >> + unsigned long flags; >> + >> + cic = cfq_cic_lookup(cfqd, current->io_context); >> + if (!cic) >> + return; >> + >> + spin_lock_irqsave(q->queue_lock, flags); > > spin_lock_irq() is sufficient here.
OK, thanks!
Jeff
| |