linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [patch 1/2] own header file for struct page.
Date: Fri, 8 Sep 2006 20:33:40 +0200	[thread overview]
Message-ID: <20060908183340.GA8421@osiris.ibm.com> (raw)
In-Reply-To: <20060908094616.48849a7a.akpm@osdl.org>

> > This moves the definition of struct page from mm.h to its own header file
> > page.h.
> > This is a prereq to fix SetPageUptodate which is broken on s390:
> > 
> > #define SetPageUptodate(_page)
> >        do {
> >                struct page *__page = (_page);
> >                if (!test_and_set_bit(PG_uptodate, &__page->flags))
> >                        page_test_and_clear_dirty(_page);
> >        } while (0)
> > 
> > _page gets used twice in this macro which can cause subtle bugs. Using
> > __page for the page_test_and_clear_dirty call doesn't work since it
> > causes yet another problem with the page_test_and_clear_dirty macro as
> > well.
> > In order to get of all these problems caused by macros it seems to
> > be a good idea to get rid of them and convert them to static inline
> > functions. Because of header file include order it's necessary to have a
> > seperate header file for the struct page definition.
> > 
> 
> hmm.
> 
> > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > +++ linux-2.6/include/linux/page.h	2006-09-08 13:10:23.000000000 +0200
> 
> We have asm/page.h, and one would expect that a <linux/page.h> would be
> related to <asm/page.h> in the usual fashion.  But it isn't.
> 
> Can we think of a different filename? page-struct.h, maybe? pageframe.h?

Yes, of course.

> > +#ifndef CONFIG_DISCONTIGMEM
> > +/* The array of struct pages - for discontigmem use pgdat->lmem_map */
> > +extern struct page *mem_map;
> > +#endif
> 
> Am surprised to see this declaration in this file.

Hmm... first I thought I could add the same declaration to asm-s390/pgtable.h.
But then deciced against it, since I would just duplicate code.
Any better idea where to put it?

--
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:[~2006-09-08 18:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-08 11:17 Heiko Carstens, Heiko Carstens
2006-09-08 16:46 ` Andrew Morton
2006-09-08 18:33   ` Heiko Carstens [this message]
2006-09-08 19:06     ` Andrew Morton
2006-09-08 19:47       ` [patch 1/2] own header file for struct page v2 Heiko Carstens, Heiko Carstens
2006-09-08 19:48       ` [patch 2/2] convert s390 page handling macros to functions v2 Heiko Carstens, Heiko Carstens
2006-09-09 21:05 ` [patch 1/2] own header file for struct page Roman Zippel
2006-09-10  7:51   ` Heiko Carstens
2006-09-10 13:07   ` [patch 1/2] own header file for struct page v3 Heiko Carstens, Heiko Carstens
2006-09-10 13:08   ` [patch 2/2] convert s390 page handling macros to functions v3 Heiko Carstens, Heiko Carstens
2006-09-10 16:25     ` Dave Hansen
2006-09-11  4:22       ` Heiko Carstens

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=20060908183340.GA8421@osiris.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    /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