linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: piggin@cyberone.com.au, Nikita@Namesys.COM, linux-mm@kvack.org
Subject: Re: [PATCH] 2.6.3-rc3-mm1: align scan_page per node
Date: Mon, 16 Feb 2004 10:44:36 -0800	[thread overview]
Message-ID: <20040216104436.7e529efd.akpm@osdl.org> (raw)
In-Reply-To: <30430000.1076956618@flay>

"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> > 
> > We would need struct page in scope for mmzone.h.  Not nice.  It could be
> > done: move the bare pageframe defn into its own header with appropriate
> > forward decls.
> 
> Bah, not that *again* ;-) ... We've hit this several times before, and 
> kludged around it. Here's an old fix from 2.5.58 ... if I do something
> along these lines to current code, and test it, would you be interested
> in taking it? I think most of the top section all got done already, so
> it really shouldn't be too bad.

It would need a lot of compile-testing.

> +struct page {
> +	unsigned long flags;		/* atomic flags, some possibly
> +					   updated asynchronously */
> +	atomic_t count;			/* Usage count, see below. */
> +	struct list_head list;		/* ->mapping has some page lists. */
> +	struct address_space *mapping;	/* The inode (or ...) we belong to. */
> +	unsigned long index;		/* Our offset within mapping. */
> +	struct list_head lru;		/* Pageout list, eg. active_list;
> +					   protected by zone->lru_lock !! */
> +	union {
> +		struct pte_chain *chain;/* Reverse pte mapping pointer.
> +					 * protected by PG_chainlock */
> +		pte_addr_t direct;
> +	} pte;
> +	unsigned long private;		/* mapping-private opaque data */
> +
> +	/*
> +	 * On machines where all RAM is mapped into kernel address space,
> +	 * we can simply calculate the virtual address. On machines with
> +	 * highmem some memory is mapped into kernel virtual memory
> +	 * dynamically, so we need a place to store that address.
> +	 * Note that this field could be 16 bits on x86 ... ;)
> +	 *
> +	 * Architectures with slow multiplication can define
> +	 * WANT_PAGE_VIRTUAL in asm/page.h
> +	 */
> +#if defined(WANT_PAGE_VIRTUAL)
> +	void *virtual;			/* Kernel virtual address (NULL if
> +					   not kmapped, ie. highmem) */
> +#endif /* WANT_PAGE_VIRTUAL */

atomic_t, list_head, pte_chain, pte_addr_t all need to be in scope and
address_space needs a forward decl.  I bet other stuff will explode.


--
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:"aart@kvack.org"> aart@kvack.org </a>

  parent reply	other threads:[~2004-02-16 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-16 12:45 Nick Piggin
2004-02-16 13:06 ` Nikita Danilov
2004-02-16 15:47 ` Martin J. Bligh
2004-02-16 17:57   ` Andrew Morton
2004-02-16 18:36     ` Martin J. Bligh
2004-02-16 18:42       ` Christoph Hellwig
2004-02-16 18:45         ` Andrew Morton
2004-02-16 18:44       ` Andrew Morton [this message]
2004-02-16 18:52         ` Martin J. Bligh

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=20040216104436.7e529efd.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Nikita@Namesys.COM \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.com \
    --cc=piggin@cyberone.com.au \
    /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