lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 9/9] ext3: do not throttle metadata and journal IO
    Date
    Delaying journal IO can unnecessarily delay other independent IO
    operations from different cgroups.

    Add BIO_RW_META flag to the ext3 journal IO that informs the io-throttle
    subsystem to account but not delay journal IO and avoid potential
    priority inversion problems.

    Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
    ---
    fs/jbd/commit.c | 4 ++--
    fs/jbd2/commit.c | 4 ++--
    2 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
    index a8e8513..2e444af 100644
    --- a/fs/jbd/commit.c
    +++ b/fs/jbd/commit.c
    @@ -318,7 +318,7 @@ void journal_commit_transaction(journal_t *journal)
    int first_tag = 0;
    int tag_flag;
    int i;
    - int write_op = WRITE;
    + int write_op = WRITE | (1 << BIO_RW_META);

    /*
    * First job: lock down the current transaction and wait for
    @@ -357,7 +357,7 @@ void journal_commit_transaction(journal_t *journal)
    * instead we rely on sync_buffer() doing the unplug for us.
    */
    if (commit_transaction->t_synchronous_commit)
    - write_op = WRITE_SYNC_PLUG;
    + write_op = WRITE_SYNC_PLUG | (1 << BIO_RW_META);
    spin_lock(&commit_transaction->t_handle_lock);
    while (commit_transaction->t_updates) {
    DEFINE_WAIT(wait);
    diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
    index 073c8c3..61484d0 100644
    --- a/fs/jbd2/commit.c
    +++ b/fs/jbd2/commit.c
    @@ -367,7 +367,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
    int tag_bytes = journal_tag_bytes(journal);
    struct buffer_head *cbh = NULL; /* For transactional checksums */
    __u32 crc32_sum = ~0;
    - int write_op = WRITE;
    + int write_op = WRITE | (1 << BIO_RW_META);

    /*
    * First job: lock down the current transaction and wait for
    @@ -408,7 +408,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
    * instead we rely on sync_buffer() doing the unplug for us.
    */
    if (commit_transaction->t_synchronous_commit)
    - write_op = WRITE_SYNC_PLUG;
    + write_op = WRITE_SYNC_PLUG | (1 << BIO_RW_META);
    stats.u.run.rs_wait = commit_transaction->t_max_wait;
    stats.u.run.rs_locked = jiffies;
    stats.u.run.rs_running = jbd2_time_diff(commit_transaction->t_start,
    --
    1.5.6.3


    \
     
     \ /
      Last update: 2009-04-14 22:29    [W:0.031 / U:0.800 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site