Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Fri Oct 20 2000 - 13:12:37 EST


On 19 Oct 00 at 16:32, Linus Torvalds wrote:

> How about adding a test in invalidate_inode_pages() like
>
> /* We cannot invalidate a locked page */
> if (TryLockPage(page))
> continue;
>
> + /* We cannot invalidate a page that is in use */
> + if (page_count(page) != 1) {
> + UnlockPage(page);
> + continue;
> + }
> +
> __lru_cache_del(page);
> __remove_inode_page(page);
 
Hi Linus,
  this did not fix problem with my testcase -
mmap(shared),fork,dirty_it,ftruncate,finish - does NOT go through
this code (invalidate_inode_pages) at all (should it?).

  I instrumented both swapout in page_io, and __remove_inode_page,
and pages are going through __remove_inode_page with strange use
count. I do not know whether it is good or no... During normal life
of system, pages with count==2 && index==0 are passed to __remove_inode_page.
As soon as I start my test, non-zero index pages with count > 2 are
passed here. Later this pages appear in filemap_sync...
                                                Thanks,
                                                        Petr Vandrovec
                                                        vandrove@vc.cvut.cz

vana:~# free
             total used free shared buffers cached
Mem: 255768 203232 52536 0 4084 35496
-/+ buffers/cache: 163652 92116
Swap: 530136 0 530136
vana:~# free
             total used free shared buffers cached
Mem: 255768 203376 52392 0 4084 35636
-/+ buffers/cache: 163656 92112
Swap: 530136 0 530136
<here testcode finished>
vana:~# free
             total used free shared buffers cached
Mem: 255768 72172 183596 0 4084 32888
-/+ buffers/cache: 35200 220568
Swap: 530136 0 530136
vana:~# free
             total used free shared buffers cached
Mem: 255768 72180 183588 0 4084 32888
-/+ buffers/cache: 35208 220560
Swap: 530136 0 530136
                                                        

11:57:44 Bad page count in __remove_inode_page!
11:57:44 page: c1349ef8
11:57:44 mapping: cc65c6dc
11:57:44 index: 0
11:57:44 nexthash: 00000000
11:57:44 count: 2
11:57:44 flags: 0x00000009
11:57:44 age: 0
11:57:44 pprevhash: 00000000
11:57:44 buffers: 00000000
11:57:44 virtual: cc61a000
11:57:44 zone: c021f578
11:57:44 pagedump done
11:57:44 Bad page count in __remove_inode_page!
11:57:44 page: c1120394
11:57:44 mapping: cc6b2edc
11:57:44 index: 32767
11:57:44 nexthash: 00000000
11:57:44 count: 3
11:57:44 flags: 0x00000009
11:57:44 age: 5
11:57:44 pprevhash: 00000000
11:57:44 buffers: 00000000
11:57:44 virtual: c43d1000
11:57:44 zone: c021f578
11:57:44 pagedump done
<snip index going down ...>
11:57:46 Bad page count in __remove_inode_page!
11:57:46 page: c1266298
11:57:46 mapping: cc6b2edc
11:57:46 index: 13635
11:57:46 nexthash: 00000000
11:57:46 count: 3
11:57:46 flags: 0x00000009
11:57:46 age: 5
11:57:46 pprevhash: 00000000
11:57:46 buffers: 00000000
11:57:46 virtual: c9082000
11:57:46 zone: c021f578
11:57:46 pagedump done
<missing part of log>
11:57:46 page->mapping == NULL
11:57:46 error: -22
11:57:46 ptep: c92f6a2c
11:57:46 pteval: 09062027
11:57:46 vma: ce926420
11:57:46 vm_mm: ccd67d60
11:57:46 vm_start: 40128000
11:57:46 vm_end: 48128000
11:57:46 vm_next: c1490b20
11:57:46 vm_avl_height: 1
11:57:46 vm_avl_left: 00000000
11:57:46 vm_avl_right: 00000000
11:57:46 vm_next_share: 00000000
11:57:46 vm_pprev_share: ccdee684
11:57:46 vm_operations_struct: c021f1a0
11:57:46 vm_pgoff: 00000000
11:57:46 vm_file: cd4270e0
11:57:46 vm_raend: 00000000
11:57:46 vm_private_data: 00000000
11:57:46 address: 4368B000
11:57:46 flags: 00000001
11:57:46 file: cd4270e0
11:57:46 dentry: cc8ae440
11:57:46 inode: cc6b2e40
11:57:46 num: 848677
11:57:46 dev: 0x00000302
11:57:46 path: /usr/src/tst/ram0 (deleted)
11:57:46 vfsmount: c14ca8c0
11:57:46 op: c0221bc0
11:57:46 count: 4
11:57:46 flags: 0x00000002
11:57:46 mode: 0000000003
11:57:46 pos: 0
11:57:46 reada: 0
11:57:46 ramax: 0
11:57:46 raend: 0
11:57:46 ralen: 0
11:57:46 rawin: 0
11:57:46 owner.pid: 0
11:57:46 owner.uid: 0
11:57:46 owner.euid: 0
11:57:46 owner.signum: 0
11:57:46 uid: 0
11:57:46 gid: 0
11:57:46 error: 0
11:57:46 version: 11641
11:57:46 private_data: 00000000
11:57:46 page: c1265a18
11:57:46 mapping: 00000000
11:57:46 index: 13667
11:57:46 nexthash: 00000000
11:57:46 count: 2
11:57:46 flags: 0x00000009
11:57:46 age: 5
11:57:46 pprevhash: 00000000
11:57:46 buffers: 00000000
11:57:46 virtual: c9062000
11:57:46 zone: c021f578
11:57:46 pagedump done
11:57:46 page->mapping == NULL
11:57:46 error: -22
11:57:46 ptep: c92f6a30
11:57:46 pteval: 09061027
11:57:46 vma: ce926420
11:57:46 vm_mm: ccd67d60
11:57:46 vm_start: 40128000
11:57:46 vm_end: 48128000
11:57:46 vm_next: c1490b20
11:57:46 vm_avl_height: 1
11:57:46 vm_avl_left: 00000000
11:57:46 vm_avl_right: 00000000
11:57:46 vm_next_share: 00000000
11:57:46 vm_pprev_share: ccdee684
11:57:46 vm_operations_struct: c021f1a0
11:57:46 vm_pgoff: 00000000
11:57:46 vm_file: cd4270e0
11:57:46 vm_raend: 00000000
11:57:46 vm_private_data: 00000000
11:57:46 address: 4368C000
11:57:46 flags: 00000001
11:57:46 file: cd4270e0
11:57:46 dentry: cc8ae440
11:57:46 inode: cc6b2e40
11:57:46 num: 848677
11:57:46 dev: 0x00000302
11:57:46 path: /usr/src/tst/ram0 (deleted)
11:57:46 vfsmount: c14ca8c0
11:57:46 op: c0221bc0
11:57:46 count: 4
11:57:46 flags: 0x00000002
11:57:46 mode: 0000000003
11:57:46 pos: 0
11:57:46 reada: 0
11:57:46 ramax: 0
11:57:46 raend: 0
11:57:46 ralen: 0
11:57:46 rawin: 0
11:57:46 owner.pid: 0
11:57:46 owner.uid: 0
11:57:46 owner.euid: 0
11:57:46 owner.signum: 0
11:57:46 uid: 0
11:57:46 gid: 0
11:57:46 error: 0
11:57:46 version: 11641
11:57:46 private_data: 00000000
11:57:46 page: c12659d4
11:57:46 mapping: 00000000
11:57:46 index: 13668
11:57:46 nexthash: 00000000
11:57:46 count: 2
11:57:46 flags: 0x00000009
11:57:46 age: 5
11:57:46 pprevhash: 00000000
11:57:46 buffers: 00000000
11:57:46 virtual: c9061000
11:57:46 zone: c021f578
11:57:46 pagedump done
<same as above, different pages...>
<overflow>
11:57:49 Bad page count in __remove_inode_page!
11:57:49 page: c135eabc
11:57:49 mapping: cc6b2edc
11:57:49 index: 49
11:57:49 nexthash: 00000000
11:57:49 count: 3
11:57:49 flags: 0x00000009
11:57:49 age: 5
11:57:49 pprevhash: 00000000
11:57:49 buffers: 00000000
11:57:49 virtual: ccafb000
11:57:49 zone: c021f578
11:57:49 pagedump done
11:57:49 Bad page count in __remove_inode_page!
11:57:49 page: c135eb00
11:57:49 mapping: cc6b2edc
11:57:49 index: 48
11:57:49 nexthash: 00000000
11:57:49 count: 3
11:57:49 flags: 0x00000009
11:57:49 age: 5
11:57:49 pprevhash: 00000000
11:57:49 buffers: 00000000
11:57:49 virtual: ccafc000
11:57:49 zone: c021f578
11:57:49 pagedump done
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:17 EST