* Re: remove-page-list patch in -mm breaks m68k [not found] <pan.2004.03.23.11.15.01.701720@smurf.noris.de> @ 2004-03-23 12:28 ` Geert Uytterhoeven 2004-03-23 12:47 ` Matthias Urlichs 2004-03-23 17:42 ` Andrew Morton 0 siblings, 2 replies; 3+ messages in thread From: Geert Uytterhoeven @ 2004-03-23 12:28 UTC (permalink / raw) To: Matthias Urlichs; +Cc: Linux/m68k, Linux Kernel Development, Andrew Morton On Tue, 23 Mar 2004, Matthias Urlichs wrote: > The patch mentioned in $SUBJECT, which is included in Andrew's mm tree, > does this to "struct page": > > diff -Nru a/include/linux/mm.h b/include/linux/mm.h > --- a/include/linux/mm.h Tue Mar 23 11:29:11 2004 > +++ b/include/linux/mm.h Tue Mar 23 11:29:11 2004 > @@ -177,7 +177,6 @@ > page_flags_t 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. */ > pgoff_t index; /* Our offset within mapping. */ > struct list_head lru; /* Pageout list, eg. active_list; > > In principle, anything that makes "struct page" smaller is a good idea. > Unfortunately, this change breaks m68k, as arch/m68k/mm/memory.c has, > and actually uses, > > #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->list)) > > Thus, apparently this change > > /* ++andreas: {get,free}_pointer_table rewritten to use unused fields from > struct page instead of separately kmalloced struct. Stolen from > arch/sparc/mm/srmmu.c ... */ Apparently arch/sparc/mm/srmmu.c stopped using this a long time ago... > needs to be reverted. It seems that a binary search through old kernel > archives is in order. I don't have a copy of the latest mm tree at hand, but in plain 2.6.5-rc2, we have several users: | tux$ find arch -type f | xargs grep 'page.*->list' | arch/i386/mm/pageattr.c: list_add(&kpte_page->list, &df_list); | arch/i386/mm/hugetlbpage.c: list_add(&page->list, | arch/i386/mm/hugetlbpage.c: list_del(&page->list); | arch/i386/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); | arch/m68k/mm/memory.c:#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->list)) | arch/sparc64/mm/hugetlbpage.c: list_add(&page->list, | arch/sparc64/mm/hugetlbpage.c: list_del(&page->list); | arch/sparc64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); | arch/ia64/mm/hugetlbpage.c: list_add(&page->list, | arch/ia64/mm/hugetlbpage.c: list_del(&page->list); | arch/ia64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); | arch/ppc64/mm/hugetlbpage.c: list_add(&page->list, | arch/ppc64/mm/hugetlbpage.c: list_del(&page->list); | arch/ppc64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); | arch/arm26/machine/small_page.c: list_del_init(&page->list); | arch/arm26/machine/small_page.c: list_add(&page->list, &order->queue); | arch/arm26/machine/small_page.c: list_add(&page->list, &order->queue); | arch/arm26/machine/small_page.c: list_del_init(&page->list); | tux$ Are all of these (except for m68k) converted in the mm tree? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remove-page-list patch in -mm breaks m68k 2004-03-23 12:28 ` remove-page-list patch in -mm breaks m68k Geert Uytterhoeven @ 2004-03-23 12:47 ` Matthias Urlichs 2004-03-23 17:42 ` Andrew Morton 1 sibling, 0 replies; 3+ messages in thread From: Matthias Urlichs @ 2004-03-23 12:47 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Linux/m68k, Linux Kernel Development, Andrew Morton Hi, Geert Uytterhoeven: > Are all of these (except for m68k) converted in the mm tree? The hugetlb stuff is covered; it basically replaces page->list with page->lru. > | arch/arm26/machine/small_page.c That's missing from -mm. However, the code suggests that a patch for arm26 would also just s/list/lru/g. Something similar to the arm26 code might work for m68k..? -- Matthias Urlichs ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remove-page-list patch in -mm breaks m68k 2004-03-23 12:28 ` remove-page-list patch in -mm breaks m68k Geert Uytterhoeven 2004-03-23 12:47 ` Matthias Urlichs @ 2004-03-23 17:42 ` Andrew Morton 1 sibling, 0 replies; 3+ messages in thread From: Andrew Morton @ 2004-03-23 17:42 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: smurf, linux-m68k, linux-kernel Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Tue, 23 Mar 2004, Matthias Urlichs wrote: > > The patch mentioned in $SUBJECT, which is included in Andrew's mm tree, > > does this to "struct page": > > > > diff -Nru a/include/linux/mm.h b/include/linux/mm.h > > --- a/include/linux/mm.h Tue Mar 23 11:29:11 2004 > > +++ b/include/linux/mm.h Tue Mar 23 11:29:11 2004 > > @@ -177,7 +177,6 @@ > > page_flags_t 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. */ > > pgoff_t index; /* Our offset within mapping. */ > > struct list_head lru; /* Pageout list, eg. active_list; > > > > In principle, anything that makes "struct page" smaller is a good idea. > > Unfortunately, this change breaks m68k, as arch/m68k/mm/memory.c has, > > and actually uses, > > > > #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->list)) > > ah-hah, thanks. --- 25/arch/m68k/mm/memory.c~m68k-stop-using-page-list 2004-03-23 09:39:17.212548984 -0800 +++ 25-akpm/arch/m68k/mm/memory.c 2004-03-23 09:39:31.179425696 -0800 @@ -29,8 +29,8 @@ typedef struct list_head ptable_desc; static LIST_HEAD(ptable_list); -#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->list)) -#define PD_PAGE(ptable) (list_entry(ptable, struct page, list)) +#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->lru)) +#define PD_PAGE(ptable) (list_entry(ptable, struct page, lru)) #define PD_MARKBITS(dp) (*(unsigned char *)&PD_PAGE(dp)->index) #define PTABLE_SIZE (PTRS_PER_PMD * sizeof(pmd_t)) _ > | tux$ find arch -type f | xargs grep 'page.*->list' > | arch/i386/mm/pageattr.c: list_add(&kpte_page->list, &df_list); > | arch/i386/mm/hugetlbpage.c: list_add(&page->list, > | arch/i386/mm/hugetlbpage.c: list_del(&page->list); > | arch/i386/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); > | arch/m68k/mm/memory.c:#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->list)) > | arch/sparc64/mm/hugetlbpage.c: list_add(&page->list, > | arch/sparc64/mm/hugetlbpage.c: list_del(&page->list); > | arch/sparc64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); > | arch/ia64/mm/hugetlbpage.c: list_add(&page->list, > | arch/ia64/mm/hugetlbpage.c: list_del(&page->list); > | arch/ia64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); > | arch/ppc64/mm/hugetlbpage.c: list_add(&page->list, > | arch/ppc64/mm/hugetlbpage.c: list_del(&page->list); > | arch/ppc64/mm/hugetlbpage.c: INIT_LIST_HEAD(&page->list); > | arch/arm26/machine/small_page.c: list_del_init(&page->list); > | arch/arm26/machine/small_page.c: list_add(&page->list, &order->queue); > | arch/arm26/machine/small_page.c: list_add(&page->list, &order->queue); > | arch/arm26/machine/small_page.c: list_del_init(&page->list); > | tux$ > > Are all of these (except for m68k) converted in the mm tree? All except for arm26: --- 25/arch/arm26/machine/small_page.c~arm-stop-using-page-list 2004-03-23 09:35:33.994483288 -0800 +++ 25-akpm/arch/arm26/machine/small_page.c 2004-03-23 09:37:08.227157744 -0800 @@ -95,7 +95,7 @@ again: offset = ffz(USED_MAP(page)); SET_USED(page, offset); if (USED_MAP(page) == order->all_used) - list_del_init(&page->list); + list_del_init(&page->lru); spin_unlock_irqrestore(&small_page_lock, flags); return (unsigned long) page_address(page) + (offset << order->shift); @@ -110,7 +110,7 @@ need_new_page: goto no_page; SetPageReserved(page); USED_MAP(page) = 0; - list_add(&page->list, &order->queue); + list_add(&page->lru, &order->queue); goto again; } @@ -151,7 +151,7 @@ static void __free_small_page(unsigned l spin_lock_irqsave(&small_page_lock, flags); if (USED_MAP(page) == order->all_used) - list_add(&page->list, &order->queue); + list_add(&page->lru, &order->queue); if (!TEST_AND_CLEAR_USED(page, spage)) goto already_free; @@ -167,7 +167,7 @@ free_page: /* * unlink the page from the small page queue and free it */ - list_del_init(&page->list); + list_del_init(&page->lru); spin_unlock_irqrestore(&small_page_lock, flags); ClearPageReserved(page); __free_page(page); _ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-23 17:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <pan.2004.03.23.11.15.01.701720@smurf.noris.de>
2004-03-23 12:28 ` remove-page-list patch in -mm breaks m68k Geert Uytterhoeven
2004-03-23 12:47 ` Matthias Urlichs
2004-03-23 17:42 ` Andrew Morton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox