linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: William Lee Irwin III <wli@holomorphy.com>, linux-mm@kvack.org
Subject: Re: PTE aging, ptep_test_and_clear_young() and TLB
Date: Sun, 18 Apr 2004 11:42:11 +0100	[thread overview]
Message-ID: <20040418114211.A9952@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20040418103616.B5745@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Sun, Apr 18, 2004 at 10:36:16AM +0100

On Sun, Apr 18, 2004 at 10:36:16AM +0100, Russell King wrote:
> Actually, we don't actually need the VMA - if you look at flush_tlb_page()
> in include/asm-arm/tlbflush.h, we only really need the MM.  Therefore,
> it's pointless digging up the VMA.  (I did think that we didn't flush
> the I-TLB if VM_EXEC wasn't set, but I think that was a previous
> incarnation.)

Grumble - there's one big problem here - it's the kernel include
dependencies.

In file included from include/linux/mm.h:25,
                 from arch/arm/kernel/asm-offsets.c:14:
include/asm/pgtable.h: In function `ptep_test_and_clear_young':
include/asm/pgtable.h:404: warning: implicit declaration of function `flush_tlb_mm_page'
include/asm/pgtable.h:404: warning: implicit declaration of function `ptep_to_mm'
include/asm/pgtable.h:404: warning: implicit declaration of function `ptep_to_address'

Ok, so linux/mm.h includes asm/pgtable.h, which in turn includes
asm-generic/pgtable.h.  I need to get at the mm and address in my
implementation of ptep_test_and_clear_young() - and the functions
are defined in asm-generic/rmap.h.  This includes linux/mm.h, so
I can't include it in asm/pgtable.h. Moreover, mm_struct hasn't
been declared yet.

Converting ptep_test_and_clear_young() to be a macro doesn't look
sane either, not without creating some rather disgusting code.

So, how do I get at the mm_struct and address in asm/pgtable.h ?
Maybe we need to split out the pte manipulation into asm/pte.h rather
than overloading pgtable.h with it?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
--
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-04-18 10:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-17 20:15 Russell King
2004-04-17 20:43 ` William Lee Irwin III
2004-04-18  9:36   ` Russell King
2004-04-18  9:39     ` William Lee Irwin III
2004-04-18 10:58       ` Hugh Dickins
2004-04-18 11:23         ` Russell King
2004-04-18 12:36           ` Hugh Dickins
2004-04-18 12:42             ` Russell King
2004-04-18 19:55               ` Russell King
2004-04-18 20:01                 ` Russell King
2004-04-18 23:14                 ` Hugh Dickins
2004-04-18 23:34                   ` Russell King
2004-04-18 15:52         ` William Lee Irwin III
2004-04-18 10:42     ` Russell King [this message]
2004-04-18 15:12       ` William Lee Irwin III
2004-04-17 22:27 ` Hugh Dickins
2004-04-17 23:47   ` Anton Blanchard

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=20040418114211.A9952@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.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