Re: [patch,rfc v2] ext3/4: enhance fsync performance when using cfq

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

 



Jens Axboe <jens.axboe@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux