lkml.org 
[lkml]   [2009]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 05/10] writeback: support > 1 flusher thread per bdi
    On Mon, Jul 06 2009, Artem Bityutskiy wrote:
    > Jens Axboe wrote:
    >> +static struct bdi_work *bdi_alloc_work(struct super_block *sb, long nr_pages,
    >> + enum writeback_sync_modes sync_mode)
    >> +{
    >> + struct bdi_work *work;
    >> +
    >> + work = kmalloc(sizeof(*work), GFP_ATOMIC);
    >> + if (work)
    >> + bdi_work_init(work, sb, nr_pages, sync_mode);
    >> - wb_start_writeback(&bdi->wb, sb, nr_pages, sync_mode);
    >> + return work;
    >> +}
    >
    > Since the caller of this function handles kmalloc failure gracefully,
    > should we also pass __GFP_NOWARN flag to kmalloc() here, in order to
    > avoid large and scary no-memory complaints?

    Sure, it can't hurt.

    --
    Jens Axboe



    \
     
     \ /
      Last update: 2009-07-06 14:25    [W:0.020 / U:31.512 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site