Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-09 Thread John Stultz
On 03/23/2014 02:50 PM, KOSAKI Motohiro wrote: > On Sun, Mar 23, 2014 at 1:26 PM, John Stultz wrote: >> On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro >> wrote: +/** + * vrange_check_purged_pte - Checks ptes for purged pages + * + * Iterates over the ptes in the pmd

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-09 Thread John Stultz
On 03/23/2014 02:50 PM, KOSAKI Motohiro wrote: On Sun, Mar 23, 2014 at 1:26 PM, John Stultz john.stu...@linaro.org wrote: On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro kosaki.motoh...@gmail.com wrote: +/** + * vrange_check_purged_pte - Checks ptes for purged pages + * + * Iterates over

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread John Stultz
On 04/07/2014 03:14 PM, KOSAKI Motohiro wrote: >>> This change hwpoison and migration tag number. maybe ok, maybe not. >> Though depending on config can't these tag numbers change anyway? > I don't think distro disable any of these. Well, it still shouldn't break if the config options are turned

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread KOSAKI Motohiro
>> This change hwpoison and migration tag number. maybe ok, maybe not. > > Though depending on config can't these tag numbers change anyway? I don't think distro disable any of these. >> I'd suggest to use younger number than hwpoison. >> (That's why hwpoison uses younger number than migration)

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread John Stultz
On 03/23/2014 10:42 AM, KOSAKI Motohiro wrote: > On Fri, Mar 21, 2014 at 2:17 PM, John Stultz wrote: >> Users of volatile ranges will need to know if memory was discarded. >> This patch adds the purged state tracking required to inform userland >> when it marks memory as non-volatile that some

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread John Stultz
On 03/23/2014 10:42 AM, KOSAKI Motohiro wrote: On Fri, Mar 21, 2014 at 2:17 PM, John Stultz john.stu...@linaro.org wrote: Users of volatile ranges will need to know if memory was discarded. This patch adds the purged state tracking required to inform userland when it marks memory as

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread KOSAKI Motohiro
This change hwpoison and migration tag number. maybe ok, maybe not. Though depending on config can't these tag numbers change anyway? I don't think distro disable any of these. I'd suggest to use younger number than hwpoison. (That's why hwpoison uses younger number than migration) So I

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-04-07 Thread John Stultz
On 04/07/2014 03:14 PM, KOSAKI Motohiro wrote: This change hwpoison and migration tag number. maybe ok, maybe not. Though depending on config can't these tag numbers change anyway? I don't think distro disable any of these. Well, it still shouldn't break if the config options are turned off.

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
On Sun, Mar 23, 2014 at 1:26 PM, John Stultz wrote: > On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro > wrote: >>> +/** >>> + * vrange_check_purged_pte - Checks ptes for purged pages >>> + * >>> + * Iterates over the ptes in the pmd checking if they have >>> + * purged swap entries. >>> + *

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread John Stultz
On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro wrote: >> +/** >> + * vrange_check_purged_pte - Checks ptes for purged pages >> + * >> + * Iterates over the ptes in the pmd checking if they have >> + * purged swap entries. >> + * >> + * Sets the vrange_walker.pages_purged to 1 if any were

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread John Stultz
On Sun, Mar 23, 2014 at 5:29 AM, Jan Kara wrote: > On Fri 21-03-14 14:17:32, John Stultz wrote: >> + * >> + * Sets the vrange_walker.pages_purged to 1 if any were purged. > ^^^ page_was_purged Doh. Thanks for catching this! Fixed in my tree. Thanks so much for the

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
> +/** > + * vrange_check_purged_pte - Checks ptes for purged pages > + * > + * Iterates over the ptes in the pmd checking if they have > + * purged swap entries. > + * > + * Sets the vrange_walker.pages_purged to 1 if any were purged. > + */ > +static int vrange_check_purged_pte(pmd_t *pmd,

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
On Fri, Mar 21, 2014 at 2:17 PM, John Stultz wrote: > Users of volatile ranges will need to know if memory was discarded. > This patch adds the purged state tracking required to inform userland > when it marks memory as non-volatile that some memory in that range > was purged and needs to be

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread Jan Kara
On Fri 21-03-14 14:17:32, John Stultz wrote: > Users of volatile ranges will need to know if memory was discarded. > This patch adds the purged state tracking required to inform userland > when it marks memory as non-volatile that some memory in that range > was purged and needs to be regenerated.

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread Jan Kara
On Fri 21-03-14 14:17:32, John Stultz wrote: Users of volatile ranges will need to know if memory was discarded. This patch adds the purged state tracking required to inform userland when it marks memory as non-volatile that some memory in that range was purged and needs to be regenerated.

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
On Fri, Mar 21, 2014 at 2:17 PM, John Stultz john.stu...@linaro.org wrote: Users of volatile ranges will need to know if memory was discarded. This patch adds the purged state tracking required to inform userland when it marks memory as non-volatile that some memory in that range was purged

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
+/** + * vrange_check_purged_pte - Checks ptes for purged pages + * + * Iterates over the ptes in the pmd checking if they have + * purged swap entries. + * + * Sets the vrange_walker.pages_purged to 1 if any were purged. + */ +static int vrange_check_purged_pte(pmd_t *pmd, unsigned long

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread John Stultz
On Sun, Mar 23, 2014 at 5:29 AM, Jan Kara j...@suse.cz wrote: On Fri 21-03-14 14:17:32, John Stultz wrote: + * + * Sets the vrange_walker.pages_purged to 1 if any were purged. ^^^ page_was_purged Doh. Thanks for catching this! Fixed in my tree. Thanks so much

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread John Stultz
On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro kosaki.motoh...@gmail.com wrote: +/** + * vrange_check_purged_pte - Checks ptes for purged pages + * + * Iterates over the ptes in the pmd checking if they have + * purged swap entries. + * + * Sets the vrange_walker.pages_purged to 1 if any

Re: [PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-23 Thread KOSAKI Motohiro
On Sun, Mar 23, 2014 at 1:26 PM, John Stultz john.stu...@linaro.org wrote: On Sun, Mar 23, 2014 at 10:50 AM, KOSAKI Motohiro kosaki.motoh...@gmail.com wrote: +/** + * vrange_check_purged_pte - Checks ptes for purged pages + * + * Iterates over the ptes in the pmd checking if they have + *

[PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-21 Thread John Stultz
Users of volatile ranges will need to know if memory was discarded. This patch adds the purged state tracking required to inform userland when it marks memory as non-volatile that some memory in that range was purged and needs to be regenerated. This simplified implementation which uses some of

[PATCH 2/5] vrange: Add purged page detection on setting memory non-volatile

2014-03-21 Thread John Stultz
Users of volatile ranges will need to know if memory was discarded. This patch adds the purged state tracking required to inform userland when it marks memory as non-volatile that some memory in that range was purged and needs to be regenerated. This simplified implementation which uses some of