mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: dhowells@redhat.com
Cc: torvalds@osdl.org, akpm@osdl.org, davidm@snapgear.com,
	linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org
Subject: Re: [PATCH] VM routine fixes
Date: Tue, 9 Nov 2004 12:55:40 +0000	[thread overview]
Message-ID: <20041109125539.GA4867@infradead.org> (raw)
In-Reply-To: <200411081432.iA8EWfmh023432@warthog.cambridge.redhat.com>

> +++ linux-2.6.10-rc1-mm3-frv/include/linux/mm.h	2004-11-05 17:44:09.120160519 +0000
> @@ -37,6 +37,10 @@ extern int sysctl_legacy_va_layout;
>  #include <asm/processor.h>
>  #include <asm/atomic.h>
>  
> +#ifndef CONFIG_MMU
> +#define swapper_pml4 NULL
> +#endif
> +
>  #ifndef MM_VM_SIZE
>  #define MM_VM_SIZE(mm)	TASK_SIZE
>  #endif
> @@ -640,6 +674,7 @@ extern void remove_shrinker(struct shrin
>   * inlining and the symmetry break with pte_alloc_map() that does all
>   * of this out-of-line.
>   */
> +#ifdef CONFIG_MMU
>  static inline pmd_t *pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
>  {
>  	if (pgd_none(*pgd))
> @@ -660,6 +695,7 @@ static inline pgd_t *pgd_alloc_k(struct 
>  		return __pgd_alloc(mm, pml4, address);
>  	return pml4_pgd_offset_k(pml4, address);
>  }
> +#endif

Please don't stick CONFIG_MMU all over the place but keep them in as small
as possible blocks.

> +#ifdef CONFIG_MMU
>  	{
>  		.ctl_name	= VM_MAX_MAP_COUNT,
>  		.procname	= "max_map_count",
> @@ -763,6 +764,7 @@ static ctl_table vm_table[] = {
>  		.mode		= 0644,
>  		.proc_handler	= &proc_dointvec
>  	},
> +#endif

As I told you before please move registration of MMU-only sysctls
to a MMU-only file in mm/

> +extern void set_page_refs(struct page *page, int order);

this should probably be an inline.

>  	mod_page_state(pgfree, 1 << order);
> +
> +#ifndef CONFIG_MMU
> +	if (order > 0)
> +		for (i = 1 ; i < (1 << order) ; ++i)
> +			__put_page(page + i);
> +#endif
> +

this is nasty.  The right thing would probably to swich !MMU arches
to use the compount-page mechanism from the hugetlb code for this.

> --- /warthog/kernels/linux-2.6.10-rc1-mm3/mm/tiny-shmem.c	2004-10-27 17:32:38.000000000 +0100
> +++ linux-2.6.10-rc1-mm3-frv/mm/tiny-shmem.c	2004-11-05 14:13:05.000000000 +0000
> @@ -112,7 +112,9 @@ int shmem_zero_setup(struct vm_area_stru
>  	if (vma->vm_file)
>  		fput(vma->vm_file);
>  	vma->vm_file = file;
> +#ifdef CONFIG_MMU
>  	vma->vm_ops = &generic_file_vm_ops;
> +#endif

And you ocmpletely ignored the previous comment here aswell.


  reply	other threads:[~2004-11-09 12:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 14:32 dhowells
2004-11-09 12:55 ` Christoph Hellwig [this message]
2004-11-09 13:53 ` David Howells
2004-11-09 14:01   ` Christoph Hellwig
2004-11-10 13:37   ` David Howells
2004-11-10 19:01     ` Andrew Morton
2004-11-11  1:17       ` David Woodhouse
2004-11-11  2:26         ` Andrew Morton
2004-11-11 11:29         ` David Howells
2004-11-11 11:43           ` Andrew Morton
2004-11-11 12:03           ` David Howells
2004-11-11 22:31 ` Andrew Morton
2004-11-12 10:33 ` David Howells
2004-11-12 10:38   ` Andrew Morton
2004-11-12 11:05   ` David Howells
2004-11-14  5:07     ` Linus Torvalds
2004-11-15 13:14     ` David Howells
2004-11-15 15:35       ` Linus Torvalds

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=20041109125539.GA4867@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=davidm@snapgear.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=uclinux-dev@uclinux.org \
    /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

all inboxes | Powered by JetHome®