Joakim Tjernlund/Transmode wrote on 2014/05/06 09:49:57:
> 
> Ulf Hansson <[email protected]> wrote on 2014/05/06 09:41:12:
> > 
> > On 6 May 2014 09:17, Joakim Tjernlund <[email protected]> 
wrote:
> > > Ulf Hansson <[email protected]> wrote on 2014/05/05 22:50:39:
> > >>
> > >> On 5 May 2014 18:55, Joakim Tjernlund 
<[email protected]>
> > > wrote:
> > >> > I got a Micron eMMC 4.41 memory and I am trying to use the TRIM
> > > function.
> > >> > my EXT_CSD_TRIM_MULT is 15 which gets me a tmo of 15*300=4500 ms
> > >> > Then in  mmc_calc_max_discard() I have:
> > >> >         max_discard = mmc_do_calc_max_discard(card, 
MMC_ERASE_ARG);
> > >> >         if (mmc_can_trim(card)) {
> > >> >                 max_trim = mmc_do_calc_max_discard(card,
> > > MMC_TRIM_ARG);
> > >> >                 if (max_trim < max_discard)
> > >> >                         max_discard = max_trim;
> > >> >         } else if (max_discard < card->erase_size) {
> > >> >                 max_discard = 0;
> > >> >         }
> > >> >         pr_debug("%s: calculated max. discard sectors %u for 
timeout
> > > %u
> > >> > ms\n",
> > >> >                  mmc_hostname(host), max_discard,
> > > host->max_busy_timeout);
> > >> > Now  mmc_do_calc_max_discard(card, MMC_TRIM_ARG) returns 0 
because the
> > >> > initial trim
> > >> > timeout is so high, 4500 ms:
> > >> >   mmc0: calculated max. discard sectors 0 for timeout 2684 ms

Just a data point, if I disable TRIM in the driver so that the code
falls back to ERASE I get:
  mmc0: calculated max. discard sectors 114688 for timeout 2684 ms
Big difference!

  Jocke
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to