lkml.org 
[lkml]   [2011]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] writeback: Per-block device bdi->dirty_writeback_interval and bdi->dirty_expire_interval.
    Hi Artem,

    > Here is a real use-case we had when developing the N900 phone. We had
    > internal flash and external microSD slot. Internal flash is soldered in
    > and cannot be removed by the user. MicroSD, in contrast, can be removed
    > by the user.
    >
    > For the internal flash we wanted long intervals and relaxed limits to
    > gain better performance.
    >
    > For MicroSD we wanted very short intervals and tough limits to make sure
    > that if the user suddenly removes his microSD (users do this all the
    > time) - we do not lose data.

    Thinking twice about it, I find that the different requirements for
    interval flash/external microSD can also be solved by this scheme.

    Introduce a per-bdi dirty_background_time (and optionally dirty_time)
    as the counterpart of (and works in parallel to) global dirty[_background]_ratio,
    however with unit "milliseconds worth of data".

    The per-bdi dirty_background_time will be set low for external microSD
    and high for internal flash. Then you get timely writeouts for microSD
    and reasonably delayed writes for internal flash (controllable by the
    global dirty_expire_centisecs).

    The dirty_background_time will actually work more reliable than
    dirty_expire_centisecs because it will checked immediately after the
    application dirties more pages. And the dirty_time could provide
    strong data integrity guarantee -- much stronger than
    dirty_expire_centisecs -- if used.

    Does that sound reasonable?

    Thanks,
    Fengguang


    \
     
     \ /
      Last update: 2011-08-18 15:15    [W:0.031 / U:209.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site