__alloc_pages: 4-order allocation failed
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 freepages((unsigned long)page_address(page)) Would anyone please give me some advice about how to solve this problem? Thanks a lot. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
__alloc_pages: 4-order allocation failed
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 freepages((unsigned long)page_address(page)) Would anyone please give me some advice about how to solve this problem? Thanks a lot. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Is an outside module supposed to use page cache?
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 wondering if I am not building a file system but at the same time want to allocate a lot of pages of physical memory to store something that has no backup storage as a file, should I add it to the page cache? Any advice would be greatly appreciated Thanks __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Is an outside module supposed to use page cache?
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 wondering if I am not building a file system but at the same time want to allocate a lot of pages of physical memory to store something that has no backup storage as a file, should I add it to the page cache? Any advice would be greatly appreciated Thanks __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
about get_zeroed_page() and page_address()
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 page_address(page) ({ if (!(page)->virtual) BUG(); (page)->virtual; })? What's (page)->virtual? Thanks Any help would be greatly appreciated. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
about get_zeroed_page() and page_address()
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 page_address(page) ({ if (!(page)-virtual) BUG(); (page)-virtual; })? What's (page)-virtual? Thanks Any help would be greatly appreciated. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Difference between get_free_page() and page_cache_alloc() ?
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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Difference between get_free_page() and page_cache_alloc() ?
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 __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Difference between get_free_page() and page_cache_alloc() ?
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 __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Difference between get_free_page() and page_cache_alloc() ?
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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: How does ramfs actually fills the page cache with data?
thanks a lot for your reply But is it at all possible to put data into page cache without going through the inodes or files? I mean, for example, if you are given a string "abcde", and you want to allocate a page to store this "abcde" into that page and add that page to the 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? 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? > > The page cache does it itself. > > "readpage" is to move pages from the backing store into the page > cache. > > "writepage" and friends is for updating the backing store with > the contents of the page cache. > > There is no real backing store of ramfs, since ramfs data lives > completly in page cache. > > But we cannot give the user random memory contents, so we zero it > out on readpage and prepare_write. > > The data is copied with copy_{from,to}_user in the generic file > operations (look how ramfs_file_operations is defined and look at > the functions referenced), which read/write through page cache. > > Regards > > Ingo Oeser > -- > Use ReiserFS to get a faster fsck and Ext2 to fsck slowly and gently. > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > __ __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: How does ramfs actually fills the page cache with data?
thanks a lot for your reply But is it at all possible to put data into page cache without going through the inodes or files? I mean, for example, if you are given a string abcde, and you want to allocate a page to store this abcde into that page and add that page to the 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? 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? The page cache does it itself. readpage is to move pages from the backing store into the page cache. writepage and friends is for updating the backing store with the contents of the page cache. There is no real backing store of ramfs, since ramfs data lives completly in page cache. But we cannot give the user random memory contents, so we zero it out on readpage and prepare_write. The data is copied with copy_{from,to}_user in the generic file operations (look how ramfs_file_operations is defined and look at the functions referenced), which read/write through page cache. Regards Ingo Oeser -- Use ReiserFS to get a faster fsck and Ext2 to fsck slowly and gently. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ __ __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
How does ramfs actually fills the page cache with data?
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. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
How does ramfs actually fills the page cache with data?
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. __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Using page cache without a file system
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 writepage if we do not back up the cache with a file system? I am currently developing a driver that wants to make use of the page cache, however, I want to save myself with the heavy load of kmalloc. Any hint would be greatly appreciated. Thanks __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Using page cache without a file system
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 writepage if we do not back up the cache with a file system? I am currently developing a driver that wants to make use of the page cache, however, I want to save myself with the heavy load of kmalloc. Any hint would be greatly appreciated. Thanks __ 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 PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/