[Devel] [PATCH] tty: Use mnt_id for first lookup of toplevel devpts

2017-11-30 Thread Cyrill Gorcunov
When we're searching for toplevel devpts mount into which the toplevel /dev/ptmx device is pointing to we should use mnt_id from mountinfo first, this is most reliable way to detect mounting. But on old kernels mnt_id may not be present so we should try s_dev lookup then and here is a nit --

Re: [Devel] [PATCH] tcache: Repeat invalidation in tcache_invalidate_node_pages()

2017-11-30 Thread Kirill Tkhai
tcache_shrink_scan() tcache_destroy_pool tcache_lru_isolate() tcache_grab_pool() ... page_cache_get_speculative() -->cnt == 2 ... tcache_put_pool() --> pool cnt zero ...

[Devel] [PATCH] tcache: Repeat invalidation in tcache_invalidate_node_pages()

2017-11-30 Thread Kirill Tkhai
When there are more than 2 users of a page, __tcache_page_tree_delete() fails to freeze it. We skip it and never try to freeze the page again. In this case the page remains not invalidated, and tcache_node->nr_pages never decremented. Later, we catch WARN_ON() reporting about this. The patch

Re: [Devel] [PATCH rh7 v2] mm/tcache: replace BUG_ON()s with WARN_ON()s

2017-11-30 Thread Kirill Tkhai
On 30.11.2017 16:43, Andrey Ryabinin wrote: > Tcache code filled with BUG_ON() checks. However the most cases > issues that BUG_ON() supposed to catch are not serious enough > to kill machine. So relax it's to WARN_ON. > Remove BUG_ON() in tcache_init_fs(), because it's useless. > It's called from

[Devel] [PATCH rh7 v2] mm/tcache: replace BUG_ON()s with WARN_ON()s

2017-11-30 Thread Andrey Ryabinin
Tcache code filled with BUG_ON() checks. However the most cases issues that BUG_ON() supposed to catch are not serious enough to kill machine. So relax it's to WARN_ON. Remove BUG_ON() in tcache_init_fs(), because it's useless. It's called from the only one place in the kernel, which looks like

Re: [Devel] [PATCH rh7] mm/tcache: replace BUG_ON()s with WARN_ON()s

2017-11-30 Thread Andrey Ryabinin
On 11/30/2017 04:24 PM, Kirill Tkhai wrote: > On 30.11.2017 15:06, Andrey Ryabinin wrote: >> Tcache code filled with BUG_ON() checks. However the most cases >> issues that BUG_ON() supposed to catch are not serious enough >> to kill machine. So relax it's to WARN_ON. >> Remove BUG_ON() in

Re: [Devel] [PATCH rh7] mm/tcache: replace BUG_ON()s with WARN_ON()s

2017-11-30 Thread Kirill Tkhai
On 30.11.2017 15:06, Andrey Ryabinin wrote: > Tcache code filled with BUG_ON() checks. However the most cases > issues that BUG_ON() supposed to catch are not serious enough > to kill machine. So relax it's to WARN_ON. > Remove BUG_ON() in tcache_init_fs(), because it's useless. > It's called from

[Devel] [PATCH rh7] mm/tcache: replace BUG_ON()s with WARN_ON()s

2017-11-30 Thread Andrey Ryabinin
Tcache code filled with BUG_ON() checks. However the most cases issues that BUG_ON() supposed to catch are not serious enough to kill machine. So relax it's to WARN_ON. Remove BUG_ON() in tcache_init_fs(), because it's useless. It's called from the only one place in the kernel, which looks like