Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page
From: Hugh Dickins <hughd@google.com>
Date: 2023-07-04 16:03:50
Also in:
linux-mm, linux-s390, lkml, sparclinux
From: Hugh Dickins <hughd@google.com>
Date: 2023-07-04 16:03:50
Also in:
linux-mm, linux-s390, lkml, sparclinux
On Tue, 4 Jul 2023, Alexander Gordeev wrote:
On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote:quoted
On Thu, 29 Jun 2023, Hugh Dickins wrote:Hi Hugh, ...quoted
No, not quite the same rules as before: I came to realize that using list_add_tail() for the HH pages would be liable to put a page on the list which forever blocked reuse of PP list_add_tail() pages after it (could be solved by a list_move() somewhere, but we have agreed to prefer simplicity).Just to make things more clear for me: do I understand correctly that this was an attempt to add HH fragments to pgtable_list from pte_free_defer()?
Yes, from page_table_free() called from pte_free_defer(): I had claimed they could be put on the list (or not) without needing to consider their HH-ness, apart from wanting to list_add_tail() rather than list_add() them. But then realized that this category of list_add_tail() pages would block access to the others. But I think I was mistaken then to say "could be solved by a list_move() somewhere"; because "somewhere" would have had to be __tlb_remove_table() when it removes PP-bits, which would bring us back to the issues of getting a spinlock from an mm which might already be freed. Hugh