From: Jeff Hartmann <jhartmann@valinux.com>
To: Timur Tabi <ttabi@interactivesi.com>
Cc: Linux Kernel Mailing list <linux-kernel@vger.kernel.org>,
Linux MM mailing list <linux-mm@kvack.org>
Subject: Re: Page Attribute Table (PAT) support?
Date: Wed, 24 Jan 2001 12:30:50 -0700 [thread overview]
Message-ID: <3A6F2D6A.107@valinux.com> (raw)
In-Reply-To: <20010124185046Z131368-18595+642@vger.kernel.org>
Timur Tabi wrote:
> ** Reply to message from Jeff Hartmann <jhartmann@valinux.com> on Wed, 24 Jan
> 2001 11:45:43 -0700
>
>
>
>> I'm actually writing support for the PAT as we speak. I already have
>> working code for PAT setup. Just having a parameter for ioremap is not
>> enough, unfortunately. According to the Intel Architecture Software
>> Developer's Manual we have to remove all mappings of the page that are
>> cached. Only then can they be mapped with per page write combining. I
>> should have working code by the 2.5.x timeframe. I can also discuss the
>> planned interface if anyone is interested.
>
>
> I'm interested. Would it be possible to port this support to 2.2, or would
> that be too much work?
Its most likely that it will be 2.5.x only for awhile. I'm not sure at
this point if it will make it into 2.4.x, much less 2.2.x.
Basically the high level interface will be a several allocation routines
which handle the cache/remapping issues for you. They will allocate
groups of pages at once (to minimize smp cache flush issues.)
Let me give fair warning this is rough writeup of provided interfaces.
I'm still not completely done with the design, and it might go through
several iterations before I'm done with it. There is no plan to provide
a generic user land interface for these functions.
Here is some function prototypes:
extern int pat_allow_page_write_combine(void);
This function is called by someone wanting to use the write combine
allocation routines. If it returns 1, per page write combining is
available.
extern struct page_list *pat_wrtcomb_alloc_page_list(int gfp_mask,
unsigned long order,
int num_pages);
An allocation routine which allocates a group of write combined pages.
extern struct virtual_page_list *pat_wrtcomb_vmalloc_page_list(
int gfp_mask,
int num_pages);
An allocation routine which allocates a group of write combined pages and
maps them contiguously in kernel virtual memory.
extern void pat_wrtcomb_free_page_list(struct page_list *list);
extern void pat_wrtcomb_vfree_page_list(struct virtual_page_list *list);
The corresponding free routines.
The following functions would be provided for changing a 4mb mapping to
the individual pte's, and vice versa.
extern int convert_4mb_page_to_individual(unsigned long address);
This function would test to see if the page address given is mapped
through a 4mb page in the kernel page tables. If it is, ever address
described by this 4mb page will get converted to individual pte entries.
extern int convert_individual_to_4mb_page(unsigned long address);
This does the opposite of the above function when all pages in a range
have the same page protection.
These functions are in turn supported by the following page list
routines, this is the only part which would be arch-independant:
struct page_list {
unsigned long *pages;
int num_pages;
unsigned long order;
};
struct virtual_page_list {
struct page_list *list;
void *addr;
};
extern struct page_list *allocate_page_list(int gfp_mask,
unsigned long order,
int num_pages);
extern struct virtual_page_list *vmalloc_page_list(unsigned long size,
int gfp_mask,
pgprot_t prot);
These functions allocate a page_list or a page_list mapped into kernel
virtual memory.
extern void free_page_list(struct page_list *list);
extern void vfree_page_list(struct virtual_page_list *list);
The corresponding free routines.
-Jeff
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-01-24 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010124174824Z129401-18594+948@vger.kernel.org>
2001-01-24 18:45 ` Jeff Hartmann
2001-01-24 18:50 ` Timur Tabi
2001-01-24 20:30 ` Timur Tabi
2001-01-24 20:30 ` Timur Tabi
2001-01-24 20:41 ` Jeff Hartmann
2001-01-24 20:48 ` Timur Tabi
[not found] ` <20010124204811Z129375-18594+1059@vger.kernel.org>
2001-01-24 21:15 ` Jeff Hartmann
2001-01-24 21:31 ` Timur Tabi
[not found] ` <20010124185046Z131368-18595+642@vger.kernel.org>
2001-01-24 19:30 ` Jeff Hartmann [this message]
2001-01-24 17:48 Timur Tabi
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=3A6F2D6A.107@valinux.com \
--to=jhartmann@valinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ttabi@interactivesi.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