[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bug-201631-13602-9EcHd7Mjso@https.bugzilla.kernel.org/>
Date: Wed, 19 Dec 2018 13:39:16 +0000
From: bugzilla-daemon@...zilla.kernel.org
To: linux-ext4@...r.kernel.org
Subject: [Bug 201631] WARNING: CPU: 11 PID: 29593 at fs/ext4/inode.c:3927
.ext4_set_page_dirty+0x70/0xb0
https://bugzilla.kernel.org/show_bug.cgi?id=201631
--- Comment #21 from Jan Kara (jack@...e.cz) ---
(In reply to Benjamin Herrenschmidt from comment #20)
> Pardon my ignorance here, but I was under the impression that this was
> normal :) The whole point being that the PTE dirty bit gets set when
> accesses happen, and latter on gets harvested into the struct page dirty bit.
>
> Otherwise, what would be the point of having a PTE dirty bit in the PTE at
> all or transferring a dirty bit from PTE to struct page in
> try_to_unmap_one() (for example) if a writable page is always mapped dirty ?
The PTE dirty bit is used for anonymous pages as you describe. File pages are
marked dirty immediately during page fault (look for example at
mm/memory.c:wp_page_shared() and its call to fault_dirty_shared_page()). When
page gets written back, clear_page_dirty_for_io() is used which writeprotects
all PTEs, clears PTE dirty bits, and then page dirty bit is cleared as well. So
for shared file mappings PTE dirty bits could be ignored.
The reason why PTE dirty bits are not ignored are partly heritage from before
2006 when this mechanism was introduced and party because people do it "just to
be sure"...
--
You are receiving this mail because:
You are watching the assignee of the bug.
Powered by blists - more mailing lists