[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <43576DAD-8A3B-4691-8808-90C5FDCF03B7@redhat.com>
Date: Mon, 4 Jan 2021 21:11:07 +0100
From: David Hildenbrand <david@...hat.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Matthew Wilcox <willy@...radead.org>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
David Hildenbrand <david@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Michal Hocko <mhocko@...e.com>,
Liang Li <liliangleo@...iglobal.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org
Subject: Re: [RFC v2 PATCH 4/4] mm: pre zero out free pages to speed up page allocation for __GFP_ZERO
> Am 04.01.2021 um 20:52 schrieb Dave Hansen <dave.hansen@...el.com>:
>
> On 1/4/21 11:27 AM, Matthew Wilcox wrote:
>>> On Mon, Jan 04, 2021 at 11:19:13AM -0800, Dave Hansen wrote:
>>> On 12/21/20 8:30 AM, Liang Li wrote:
>>>> --- a/include/linux/page-flags.h
>>>> +++ b/include/linux/page-flags.h
>>>> @@ -137,6 +137,9 @@ enum pageflags {
>>>> #endif
>>>> #ifdef CONFIG_64BIT
>>>> PG_arch_2,
>>>> +#endif
>>>> +#ifdef CONFIG_PREZERO_PAGE
>>>> + PG_zero,
>>>> #endif
>>>> __NR_PAGEFLAGS,
>>>
>>> I don't think this is worth a generic page->flags bit.
>>>
>>> There's a ton of space in 'struct page' for pages that are in the
>>> allocator. Can't we use some of that space?
>>
>> I was going to object to that too, but I think the entire approach is
>> flawed and needs to be thrown out. It just nukes the caches in extremely
>> subtle and hard to measure ways, lowering overall system performance.
>
> Yeah, it certainly can't be the default, but it *is* useful for thing
> where we know that there are no cache benefits to zeroing close to where
> the memory is allocated.
>
> The trick is opting into it somehow, either in a process or a VMA.
>
The patch set is mostly trying to optimize starting a new process. So process/vma doesn‘t really work.
I still wonder if using tmpfs/shmem cannot somehow be used to cover the original use case of starting a new vm fast (or rebooting an existing one involving restarting the process).
Powered by blists - more mailing lists