Re: prospective 13/12 s390 pgtable_list patch

Alexander Gordeev
2023-06-23T09:29:30Z

On Thu, Jun 22, 2023 at 10:49:43PM -0700, Hugh Dickins wrote:
> Hi Gerald,
>
> It's that moment you've been dreading: I'm hoping that you can, please,
> take a look at the patch below, and try building and running with it,
> on top of the v2 series of 12 I sent out on Tuesday.
>
> If this seems okay to you, I'll send it properly as 13/12 of that series,
> to the full Cc list; but of course you may find I've missed typos and worse
> - please don't waste your time on it if it's rubbish, but so far as I can
> tell, it is complete and ready now.
>
> Thanks!
> Hugh

Hi Hugh,

Gerald is off until Monday and I think is not able to answer right now.

We had discussions with regard to how to better approach your series and
did not come to a conclusion unfortunatelly.

Gerald had several concerns - one of them is global mm_pgtable_list_lock,
wich is luckily avoided with this follow-up patch. But there were others,
which I am not able to articulate in detail.

While you are doing an outstanding job in trying to adjust our fragmented
page tables reuse scheme, one of the ideas emerged was to actually give it
up: partially or may be even fully. That is - not to reuse page tables
returned via pte_free_defer() or not to reuse them at all. To assess this
possible new approaches some statistics is needed and am working on a
prototype that would allow collecting it.

Note, our existing code is extremly complicated already and we had hard
time fixing (at least one) ugly race related to that. With the changes
you suggest that complexity (to me personally) multiplies. But that well
could be the other way around and I am just not smart enough to grasp it.
At least the claim that page_table_free() no longer needs the two-step
release indicates that.

I am sorry that it is probably not the status you would like to hear,
but I still wonder what is your opinion on that do-not-reuse-fragments
approach? Would it simplify pte_free_defer() or had no effect?

Anyway, that is just another option and I will try your patch.

Thanks!