__alloc_pages: 4-order allocation failed

2001-07-02 Thread Ho Chak Hung
Hi, I got the error __alloc_pages: 4-order allocation failed in a module that uses and frees a lot of pages. Basically, I am trying implement a page cache for the module. First, I keep allocating pages using page_cache_alloc() until it fails, then I free a whole bunch of pages using

__alloc_pages: 4-order allocation failed

2001-07-02 Thread Ho Chak Hung
Hi, I got the error __alloc_pages: 4-order allocation failed in a module that uses and frees a lot of pages. Basically, I am trying implement a page cache for the module. First, I keep allocating pages using page_cache_alloc() until it fails, then I free a whole bunch of pages using

Is an outside module supposed to use page cache?

2001-06-28 Thread Ho Chak Hung
Hi, I am trying to develop a module that makes use of the page cache(by allocating a LOT of pages use page_cache_alloc and then add_to_page_cache). However, I got some unresolved symbols error during insmod.(because the symbols related to lru_cache_add etc are not exported?) . I am just

Is an outside module supposed to use page cache?

2001-06-28 Thread Ho Chak Hung
Hi, I am trying to develop a module that makes use of the page cache(by allocating a LOT of pages use page_cache_alloc and then add_to_page_cache). However, I got some unresolved symbols error during insmod.(because the symbols related to lru_cache_add etc are not exported?) . I am just

about get_zeroed_page() and page_address()

2001-06-26 Thread Ho Chak Hung
In the get_zeroed_page()function, address = page_address(page) 1)Does address point to a contiguous block of 4KB of physical memory? i.e.can I access the individual bytes by *address++? 2)How is page_address() function defined? I did a grep and found something like: #define

about get_zeroed_page() and page_address()

2001-06-26 Thread Ho Chak Hung
In the get_zeroed_page()function, address = page_address(page) 1)Does address point to a contiguous block of 4KB of physical memory? i.e.can I access the individual bytes by *address++? 2)How is page_address() function defined? I did a grep and found something like: #define

Difference between get_free_page() and page_cache_alloc() ?

2001-06-25 Thread Ho Chak Hung
Never mind.. I figured it out. __ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Difference between get_free_page() and page_cache_alloc() ?

2001-06-25 Thread Ho Chak Hung
get_free_page() returns a pointer to a page while page_cache_alloc returns a pointer to a page struct. Is page_cache_alloc more efficient than get_free_page()? Also, does get_free_page returns a pointer to a contiguous block of physical memory? Thanks

Difference between get_free_page() and page_cache_alloc() ?

2001-06-25 Thread Ho Chak Hung
get_free_page() returns a pointer to a page while page_cache_alloc returns a pointer to a page struct. Is page_cache_alloc more efficient than get_free_page()? Also, does get_free_page returns a pointer to a contiguous block of physical memory? Thanks

Difference between get_free_page() and page_cache_alloc() ?

2001-06-25 Thread Ho Chak Hung
Never mind.. I figured it out. __ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL

Re: How does ramfs actually fills the page cache with data?

2001-06-24 Thread Ho Chak Hung
he page cache, what would you do? 2)The ramfs uses the generic file operation Ingo Oeser <[EMAIL PROTECTED]> wrote: > > On Fri, Jun 22, 2001 at 05:45:27PM -0400, Ho Chak Hung wrote: > > In fs/ramfs/inode.c, how does ramfs actually fills the page > > cache with data?

Re: How does ramfs actually fills the page cache with data?

2001-06-24 Thread Ho Chak Hung
you do? 2)The ramfs uses the generic file operation Ingo Oeser [EMAIL PROTECTED] wrote: On Fri, Jun 22, 2001 at 05:45:27PM -0400, Ho Chak Hung wrote: In fs/ramfs/inode.c, how does ramfs actually fills the page cache with data? In the readpage operation, it only zero-fill the page

How does ramfs actually fills the page cache with data?

2001-06-22 Thread Ho Chak Hung
In fs/ramfs/inode.c, how does ramfs actually fills the page cache with data? In the readpage operation, it only zero-fill the page if it didn't already exist in the page cache. However, how do I actually fill the page with data? Thanks a lot.

How does ramfs actually fills the page cache with data?

2001-06-22 Thread Ho Chak Hung
In fs/ramfs/inode.c, how does ramfs actually fills the page cache with data? In the readpage operation, it only zero-fill the page if it didn't already exist in the page cache. However, how do I actually fill the page with data? Thanks a lot.

Using page cache without a file system

2001-06-21 Thread Ho Chak Hung
Hi, Is it possible to allocate and add pages to the page cache without a underlying file system in Linux 2.4? I know that the host pointer to inode structure inside the address_space structure can be NULL, but does this mean that we can still make use of page cache operations like readpage or

Using page cache without a file system

2001-06-21 Thread Ho Chak Hung
Hi, Is it possible to allocate and add pages to the page cache without a underlying file system in Linux 2.4? I know that the host pointer to inode structure inside the address_space structure can be NULL, but does this mean that we can still make use of page cache operations like readpage or