lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 May 2012 19:36:57 +0530
From:	"S, Venkatraman" <svenkatr@...com>
To:	kdorfman@...eaurora.org
Cc:	linux-mmc@...r.kernel.org, cjb@...top.org, linux-mm@...ck.org,
	linux-fsdevel@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, arnd.bergmann@...aro.org,
	alex.lemberg@...disk.com, ilan.smith@...disk.com,
	lporzio@...ron.com, rmk+kernel@....linux.org.uk
Subject: Re: [PATCH v2 14/16] mmc: block: Implement HPI invocation and
 handling logic.

On Wed, May 9, 2012 at 2:05 PM,  <kdorfman@...eaurora.org> 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.
>

Byte count returned by DMA or the HC doesn't mean that the data has
actually been
burnt into the device (due to internal buffering). This is one of the
reasons for
defining the CORRECTLY_PRG_SECTORS_NUM register in the standard which
can be queried to find how much was correctly written.
 Unfortunately it can only be queried after the abort has been issued.

>> +
>> +     return false;
>> +}
>
> Thanks, Kostya
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ