lkml.org 
[lkml]   [2013]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES
> +                       /*
> + * By flagging sys_swapon, a sysadmin can tell us to
> + * either do sinle-time area discards only, or to just
> + * perform discards for released swap page-clusters.
> + * Now it's time to adjust the p->flags accordingly.
> + */
> + if (swap_flags & SWAP_FLAG_DISCARD_ONCE)
> + p->flags &= ~SWP_PAGE_DISCARD;
> + else if (swap_flags & SWAP_FLAG_DISCARD_PAGES)
> + p->flags &= ~SWP_AREA_DISCARD;

When using old swapon(8), this code turn off both flags, right?


\
 
 \ /
  Last update: 2013-05-26 14:21    [W:1.062 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site