Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +                       /*
> +                        * 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?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]