lkml.org 
[lkml]   [2010]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable)
    Date
    Am Sonntag, 17. Januar 2010 14:55:55 schrieb Rafael J. Wysocki:
    > +void mm_force_noio_allocations(void)
    > +{
    > + /* Wait for all slowpath allocations using the old mask to complete */
    > + down_write(&gfp_allowed_mask_sem);
    > + saved_gfp_allowed_mask = gfp_allowed_mask;
    > + gfp_allowed_mask &= ~(__GFP_IO | __GFP_FS);
    > + up_write(&gfp_allowed_mask_sem);
    > +}

    In addition to this you probably want to exhaust all memory reserves
    before you fail a memory allocation and forbid the OOM killer to run.

    Regards
    Oliver


    \
     
     \ /
      Last update: 2010-01-18 18:03    [W:4.169 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site