linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>,
	Christoph Lameter <clameter@engr.sgi.com>,
	linux-mm@kvack.org, pm list <linux-pm@lists.osdl.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [RFC][PATCH 1/3] swsusp: Do not use page flags directly
Date: Tue, 13 Mar 2007 15:45:12 +1100	[thread overview]
Message-ID: <45F62C58.50106@yahoo.com.au> (raw)
In-Reply-To: <200703041507.45171.rjw@sisk.pl>

Rafael J. Wysocki wrote:
> Make swsusp stop using SetPageNosave(), SetPageNosaveFree() and friends
> directly.
> 
> This way the amount of changes made in the next patch is smaller.
> 
> ---
>  include/linux/suspend.h |   33 +++++++++++++++++++++++++++++++++
>  kernel/power/snapshot.c |   48 +++++++++++++++++++++++++-----------------------
>  mm/page_alloc.c         |    6 +++---
>  3 files changed, 61 insertions(+), 26 deletions(-)
> 
> Index: linux-2.6.21-rc2/include/linux/suspend.h
> ===================================================================
> --- linux-2.6.21-rc2.orig/include/linux/suspend.h	2007-03-02 09:05:53.000000000 +0100
> +++ linux-2.6.21-rc2/include/linux/suspend.h	2007-03-02 09:24:02.000000000 +0100
> @@ -8,6 +8,7 @@
>  #include <linux/notifier.h>
>  #include <linux/init.h>
>  #include <linux/pm.h>
> +#include <linux/mm.h>
>  
>  /* struct pbe is used for creating lists of pages that should be restored
>   * atomically during the resume from disk, because the page frames they have
> @@ -49,6 +50,38 @@ void __save_processor_state(struct saved
>  void __restore_processor_state(struct saved_context *ctxt);
>  unsigned long get_safe_page(gfp_t gfp_mask);
>  
> +/* Page management functions for the software suspend (swsusp) */
> +
> +static inline void swsusp_set_page_forbidden(struct page *page)
> +{
> +	SetPageNosave(page);
> +}
> +
> +static inline int swsusp_page_is_forbidden(struct page *page)
> +{
> +	return PageNosave(page);
> +}
> +
> +static inline void swsusp_unset_page_forbidden(struct page *page)
> +{
> +	ClearPageNosave(page);
> +}
> +
> +static inline void swsusp_set_page_free(struct page *page)
> +{
> +	SetPageNosaveFree(page);
> +}
> +
> +static inline int swsusp_page_is_free(struct page *page)
> +{
> +	return PageNosaveFree(page);
> +}
> +
> +static inline void swsusp_unset_page_free(struct page *page)
> +{
> +	ClearPageNosaveFree(page);
> +}

Hi,

I don't have much to do with swsusp, but I really prefer that a
page flag name should tell you what the property of the page is,
rather than what this subsystem should or shouldn't do with it.

I thought the page flag names I used were pretty nice, and a big
improvement overthe current page flag names.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

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

  reply	other threads:[~2007-03-13  4:45 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 10:13 Remove page flags for software suspend Christoph Lameter
2007-02-16 10:56 ` Rafael J. Wysocki
2007-02-28 10:14   ` Pavel Machek
2007-02-28 15:25     ` Christoph Lameter
2007-02-28 17:13       ` Rafael J. Wysocki
2007-02-28 17:17         ` Christoph Lameter
2007-02-28 17:33           ` Rafael J. Wysocki
2007-02-28 17:35             ` Christoph Lameter
2007-02-28 17:51               ` Rafael J. Wysocki
2007-02-28 17:56                 ` Christoph Lameter
2007-02-28 21:11                   ` Pavel Machek
2007-03-01  2:35           ` Nick Piggin
2007-03-01 15:18         ` Nick Piggin
2007-03-01 15:33           ` Rafael J. Wysocki
2007-03-01 23:10             ` Rafael J. Wysocki
2007-03-04 13:50             ` [RFC][PATCH 0/3] swsusp: Do not use page flags (was: Re: Remove page flags for software suspend) Rafael J. Wysocki
2007-03-04 14:07               ` [RFC][PATCH 1/3] swsusp: Do not use page flags directly Rafael J. Wysocki
2007-03-13  4:45                 ` Nick Piggin [this message]
2007-03-04 14:07               ` [RFC][PATCH 2/3] swsusp: Do not use page flags Rafael J. Wysocki
2007-03-13  4:47                 ` Nick Piggin
2007-03-13  9:16                   ` Rafael J. Wysocki
2007-03-13  9:23                     ` Nick Piggin
2007-03-13 10:17                       ` Rafael J. Wysocki
2007-03-13 10:31                         ` Nick Piggin
2007-03-13 21:20                           ` Rafael J. Wysocki
2007-03-14  3:17                             ` Nick Piggin
2007-03-14  8:30                               ` Rafael J. Wysocki
2007-03-04 14:08               ` [RFC][PATCH 3/3] mm: Remove nosave and nosave_free " Rafael J. Wysocki
2007-03-08  1:00               ` [RFC][PATCH 0/3] swsusp: Do not use page flags (was: Re: Remove page flags for software suspend) Johannes Berg
2007-03-08 22:05                 ` Rafael J. Wysocki
2007-03-08 22:10                   ` Johannes Berg
2007-03-08 22:33                     ` Rafael J. Wysocki
2007-03-08 22:43                       ` Johannes Berg
2007-03-08 22:54                         ` Rafael J. Wysocki
2007-03-08 22:54                           ` Johannes Berg
2007-03-08 23:15                   ` Pavel Machek
2007-03-08 23:21                     ` Johannes Berg
2007-03-08 23:23                       ` Pavel Machek
2007-03-08 23:34                       ` Rafael J. Wysocki
2007-03-08 23:36                         ` Pavel Machek
2007-03-08 15:09               ` Johannes Berg
2007-03-08 22:10                 ` Rafael J. Wysocki
2007-03-08 22:12                   ` Johannes Berg
2007-03-08 15:53               ` Peter Zijlstra
2007-03-08 22:11                 ` Rafael J. Wysocki
2007-03-01 17:48           ` Remove page flags for software suspend Hugh Dickins
2007-03-13  3:36             ` Nick Piggin
2007-03-01 20:46           ` Rafael J. Wysocki
2007-03-02 10:17             ` Pavel Machek
2007-02-28 21:08       ` Pavel Machek
2007-02-28 21:16         ` Christoph Lameter
2007-02-28 21:22           ` Pavel Machek
2007-02-28 22:23             ` Rafael J. Wysocki
2007-03-01  2:31         ` Nick Piggin
2007-02-28 10:14   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45F62C58.50106@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=clameter@engr.sgi.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox