Re: [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable)

From: Rafael J. Wysocki
Date: Mon Jan 18 2010 - 15:41:37 EST


On Monday 18 January 2010, Oliver Neukum wrote:
> 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

I'm not really sure what you mean.

> and forbid the OOM killer to run.

The OOM killer has already been disabled at this point, by the freezer.

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/