Hi,
in the patch attached I improved the memory usage for my data structures by
using a kmem_cache. Also I do not use a single radix-tree for the pointers to
the list anymore but every mapping gets its own... So I should be able to
prefetch not only from the swap space but from other disk-places, too.
But exactly this does not work and I need some help with this...
If I do add pages from the swaper_space mapping to the prefetch list
everything works perfectly. But as soon as I add all pages with a mapping to
the list I get the Oops attached... :-(
It happens in the radix_tree_delete call from the swap_prefetch work handler.
So I think I access an invalid (perhaps not initialized?) radix tree... But
why I wonder is that this entry was properly inserted to the tree, because
else it would never had been inserted to the list!
So I am only very confused..!
Thanks for your help!
Thomas Schlichter
On April 12, Andrew Morton wrote:
> Thomas Schlichter <schlicht@uni-mannheim.de> wrote:
> > How can I get the file pointer for a buffered page with the information
> > available in the kswapd (minly the page struct)??
>
> You can't, really. There can be any number of file*'s pointing at an
> inode.
OK, I understand...
> The pagefault handler will find it by find_vma(faulting_address)->vm_file.
> Other codepaths use syscalls, and the user passed the file* in.
>
> You can call page_cache_readahead() with a NULL file*. That'll mostly work
> except for the odd filesytem like NFS which will oops. But it's good
> enough for testing and development.
That's the way I try it now... ;-)
> Or you could cook up a local file struct along the lines of
> fs/nfsd/vfs.c:nfsd_read(), but I would not like to lead a young person
> that way ;)
Thx... ;-)
ksymoops 2.4.2 on i586 2.5.67. Options used
-V (default)
-k /proc/ksyms (default)
-l /proc/modules (default)
-o /lib/modules/2.5.67/ (default)
-m /boot/System.map-2.5.67 (default)
Warning: You did not tell me where to find symbol information. I will
assume that the log matches the kernel and modules that are running
right now and I'll use the default options above for symbol resolution.
If the current kernel and/or modules do not match the log, you can get
more accurate output by telling me the kernel version and where to find
map, modules, ksyms etc. ksymoops -h explains the options.
Error (regular_file): read_ksyms stat /proc/ksyms failed
No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel paging request at virtual address 64815c28
c02018e8
*pde = 00000000
Oops: 0000 [#1]
CPU: 0
EIP: 0060:[<c02018e8>] Tainted: P
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010283
eax: 64815c28 ebx: c12b9f3c ecx: 8b21ca84 edx: 64815c24
esi: 8b21ca7e edi: 00000001 ebp: c12b9f6c esp: c12b9f20
ds: 007b es: 007b ss: 0068
Stack: c2e34c6c c03840e0 c12b8000 c1daf716 00000000 00000000 ceeb5570 64815c24
64815c28 00000282 c2e34c50 c2e34c50 c03840e0 c12b8000 00000000 00000000
000003d4 00002a76 c12b9f74 c12b9f88 d4b0415f ceeb5568 00000001 c12b8000
[<d4b0415f>] prefetch_work_handler+0x12f/0x210 [swap_prefetch]
[<d4b04d80>] prefetch_work+0x0/0x60 [swap_prefetch]
[<c0139dcf>] worker_thread+0x28f/0x438
[<c0139b40>] worker_thread+0x0/0x438
[<d4b04030>] prefetch_work_handler+0x0/0x210 [swap_prefetch]
[<c0122d38>] default_wake_function+0x0/0x18
[<c0122d38>] default_wake_function+0x0/0x18
[<c01081e5>] kernel_thread_helper+0x5/0xc
Code: 8b 10 85 d2 74 6a 89 f8 89 f1 d3 e8 83 e0 3f 8d 44 82 04 89
>>EIP; c02018e8 <radix_tree_delete+4c/c8> <=====
Code; c02018e8 <radix_tree_delete+4c/c8>
00000000 <_EIP>:
Code; c02018e8 <radix_tree_delete+4c/c8> <=====
0: 8b 10 mov (%eax),%edx <=====
Code; c02018ea <radix_tree_delete+4e/c8>
2: 85 d2 test %edx,%edx
Code; c02018ec <radix_tree_delete+50/c8>
4: 74 6a je 70 <_EIP+0x70> c0201958 <radix_tree_delete+bc/c8>
Code; c02018ee <radix_tree_delete+52/c8>
6: 89 f8 mov %edi,%eax
Code; c02018f0 <radix_tree_delete+54/c8>
8: 89 f1 mov %esi,%ecx
Code; c02018f2 <radix_tree_delete+56/c8>
a: d3 e8 shr %cl,%eax
Code; c02018f4 <radix_tree_delete+58/c8>
c: 83 e0 3f and $0x3f,%eax
Code; c02018f6 <radix_tree_delete+5a/c8>
f: 8d 44 82 04 lea 0x4(%edx,%eax,4),%eax
Code; c02018fa <radix_tree_delete+5e/c8>
13: 89 00 mov %eax,(%eax)
1 warning and 1 error issued. Results may not be reliable.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:21 EST