google / kernel-sanitizers

Linux Kernel Sanitizers, fast bug-detectors for the Linux kernel
https://google.github.io/kernel-sanitizers/
442 stars 87 forks source link

Handle synchronization on struct page #211

Open dvyukov opened 9 years ago

dvyukov commented 9 years ago

We've removed all synchronization on page struct because it lead to enormous memory consumption for vector clocks (there were millions of sync objects). Initially we've not noticed false positives. But here is one: https://groups.google.com/forum/#!topic/ktsan/m1lJug5oAIg (see the explanation by Theodore that the code is actually synchronized on struct page->flags). There are hundreds of uses of lock_page and trylock_page throughout kernel code, so we need to restore synchronization on struct page. Otherwise we will be constantly hitting false positives.