* (struct page *)->list
@ 2001-04-07 22:30 Bulent Abali
2001-04-08 1:39 ` Benjamin C.R. LaHaise
0 siblings, 1 reply; 2+ messages in thread
From: Bulent Abali @ 2001-04-07 22:30 UTC (permalink / raw)
To: linux-mm
Question about the ->list field in linux/include/mm.h
typedef struct page
{
struct list_head list;
...
} mem_map_t;
I have a device driver that allocates pages with
alloc_pages(gfp_mask,0) call. I want to use
the ->list field and associated list_add() and list_del()
functions to keep track of my pages. The driver allocates
with GFP_KERNEL and GFP_HIGHUSER and will use the PAE
mode as well.
The question is if I unhook the page->list field after
page=alloc_page() and add page->list to my private linked list
will that cause a problem elsewhere in the kernel?
>From my reading the code, the list field
is used only when pages are in the free page pool or
in the mmap code in mm/filemap.c. Appreciate any suggestions.
Bulent
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (struct page *)->list
2001-04-07 22:30 (struct page *)->list Bulent Abali
@ 2001-04-08 1:39 ` Benjamin C.R. LaHaise
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin C.R. LaHaise @ 2001-04-08 1:39 UTC (permalink / raw)
To: Bulent Abali; +Cc: linux-mm
On Sat, 7 Apr 2001, Bulent Abali wrote:
> The question is if I unhook the page->list field after
> page=alloc_page() and add page->list to my private linked list
> will that cause a problem elsewhere in the kernel?
This isn't portable between 2.2 and 2.4. Treating struct page as an
opaque type is the recommended strategy.
-ben
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-08 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-07 22:30 (struct page *)->list Bulent Abali
2001-04-08 1:39 ` Benjamin C.R. LaHaise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox