Re: [PATCH v2 14/16] mmc: block: Implement HPI invocation and handling logic.

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

 



On Wednesday 09 May 2012, kdorfman@xxxxxxxxxxxxxx wrote:
> > +static bool mmc_can_do_foreground_hpi(struct mmc_queue *mq,
> > +                     struct request *req, unsigned int thpi)
> > +{
> > +
> > +     /*
> > +      * If some time has elapsed since the issuing of previous write
> > +      * command, or if the size of the request was too small, there's
> > +      * no point in preempting it. Check if it's worthwhile to preempt
> > +      */
> > +     int time_elapsed = jiffies_to_msecs(jiffies -
> > +                     mq->mqrq_cur->mmc_active.mrq->cmd->started_time);
> > +
> > +     if (time_elapsed <= thpi)
> > +                     return true;
> Some host controllers (or DMA) has possibility to get the byte count of
> current transaction. It may be implemented as host api (similar to abort
> ops). Then you have more accurate estimation of worthiness.

I'm rather sure that the byte count is not relevant here: it's not
the actual write that is taking so long, it's the garbage collection
that the device does internally before the write actually gets done.
The data transfer is much faster than the time we are waiting for here.

	Arnd

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]