[lkml]   [2011]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: [PATCH v4 1/3]mmc: set max_discard_sectors value for mmc queue
    > -----Original Message-----
    > From: Arnd Bergmann []
    > Sent: Saturday, February 12, 2011 4:38 PM
    > To: Dong, Chuanxiao
    > Cc:;;;
    > Subject: Re: [PATCH v4 1/3]mmc: set max_discard_sectors value for mmc queue
    > On Saturday 12 February 2011 07:22:14 Chuanxiao Dong wrote:
    > > max_discard_sectors value is UINT_MAX which means kernel block layer can pass
    > > down unlimited sectors to MMC driver to erase. But erasing so many sectors may
    > > delay some other important I/O requests. This is not preferred.
    > >
    > > So use 'pref_erase' to set a suitable max_discard_sectors value for mmc queue to
    > > avoid erasing too many sectors at one time.
    > >
    > > Signed-off-by: Chuanxiao Dong <>
    > I'm not sure about this one. pref_erase on SDHC cards should be the *minimum*
    > unit you can erase in one request, not the maximum. Erasing an arbitrary
    Hi Arnd,
    I found the comment in mmc_init_erase() function which explains the 'pref_erase':
    'pref_erase' is defined as a guide to limit erases to that size and alignment.
    So I think it is not the minimum unit driver can erase, also not the maximum erase unit. It just a guide erase size for driver which can avoid holding host controller too long to response other I/O requests.

    > number of allocation units on an SDHC card should complete almost instantly,
    > because it only needs to update a single table with the allocation units.
    > Discarding partial allocation units will take a lot longer, because the
    > card then has to copy over the remaining blocks.
    Is discarding started when card is idle or right after erase command? Can it cause some other I/O requests delayed?

     \ /
      Last update: 2011-02-12 11:45    [W:0.023 / U:11.712 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site