lkml.org 
[lkml]   [2010]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch,rfc v2] ext3/4: enhance fsync performance when using cfq
Date
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


\
 
 \ /
  Last update: 2010-04-08 21:13    [W:0.577 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site