From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7057C77B7E for ; Tue, 2 May 2023 15:21:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 690F36B0093; Tue, 2 May 2023 11:21:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6410F6B0095; Tue, 2 May 2023 11:21:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 530596B0096; Tue, 2 May 2023 11:21:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by kanga.kvack.org (Postfix) with ESMTP id 31FBD6B0093 for ; Tue, 2 May 2023 11:21:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683040910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D9Z1Hse3LEHo6GNdRhFKInTnulP4yrVR64MMu+/xyUM=; b=dU54H6vwkmOGAoRfc6pqqeEmMil9y/ntvcXGnvnUUSbvEDApPrufj+e6h0M57mVPiua3SU hBc5hJY75C9ktLu5P8Wxqnie0sfcc25cIePw+Hu3xsUU12nBjIju7xLT7BTACR5I7k9p8U ZwwAms4TlWnRSpLV7OGZexFOy9T3exk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-Vel_oPoJPSKYDLAOPB1Giw-1; Tue, 02 May 2023 11:21:48 -0400 X-MC-Unique: Vel_oPoJPSKYDLAOPB1Giw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f16ef3be6eso24046285e9.3 for ; Tue, 02 May 2023 08:21:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683040906; x=1685632906; h=content-transfer-encoding:in-reply-to:subject:organization:from :references:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D9Z1Hse3LEHo6GNdRhFKInTnulP4yrVR64MMu+/xyUM=; b=C3cBn9of9uavB1EFg6sBAmDs3MjbU+L86Sqwo6fjYvj6I2g5sYwzC3+JeFx02mVuV+ A8A5DrW0u3XnP7AYv/UPgc0nxX5kqVtZTUmTC2KN6Va58StFPbUkc8qNOY2lSeCspv7N 9Xj95awpF6/5L0pordMua6I9jRfSs2RSXOdqV4T10R+hEZUUd6RJH9JZKHhYG1OGdNmY FEUohyr9NEMSvfoGJatLCxga4eXwdEQP8guvF4MYmGXCEU1mSpkJT71S1hkNexD6IJEI e+kD93sD8M4ENOKS40p3MMt625WJK0zcETwom7HSBtH3OcIsWiY9G/d2WJrbVUE01Ss2 LjOw== X-Gm-Message-State: AC+VfDxBZH4hvOgfE8uZdHx1Me4DdKCkI6t7lnSfoSgcoT6tSzbRy2OP 6MH+CIr0yHqqGaiNQPLpSogEhkJ/4xUpL/7PmGszekL9zCMWgDC0SYo0Yw4YNOEAuqkPxnGvO+0 kW97YjbeDu7clekOGQzE= X-Received: by 2002:a5d:58e2:0:b0:2f5:67c1:d70e with SMTP id f2-20020a5d58e2000000b002f567c1d70emr12704124wrd.21.1683040906464; Tue, 02 May 2023 08:21:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6FG2hz46+i5qcnyBvqbYomW8Kl7z/xxr8UOQ7Q5sI1kHXtADgPBuYxfoU5t+eUjouBrOMRVg== X-Received: by 2002:a5d:58e2:0:b0:2f5:67c1:d70e with SMTP id f2-20020a5d58e2000000b002f567c1d70emr12704105wrd.21.1683040906115; Tue, 02 May 2023 08:21:46 -0700 (PDT) Received: from [192.168.3.108] (p5b0c6ae5.dip0.t-ipconnect.de. [91.12.106.229]) by smtp.gmail.com with ESMTPSA id v16-20020a5d6b10000000b003062765bf1dsm8053514wrw.33.2023.05.02.08.21.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 May 2023 08:21:45 -0700 (PDT) Message-ID: <34138d9a-5439-5875-ea1b-6584b0c87a67@redhat.com> Date: Tue, 2 May 2023 17:21:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Matthew Wilcox , Mel Gorman Cc: Johannes Weiner , linux-mm@kvack.org, Kaiyang Zhao , Vlastimil Babka , David Rientjes , linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20230418191313.268131-1-hannes@cmpxchg.org> <20230421161156.5jnipnfs4svwwzee@techsingularity.net> From: David Hildenbrand Organization: Red Hat Subject: Re: [RFC PATCH 00/26] mm: reliable huge page allocator In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000121, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 21.04.23 19:14, Matthew Wilcox wrote: > On Fri, Apr 21, 2023 at 05:11:56PM +0100, Mel Gorman wrote: >> It was considered once upon a time and comes up every so often as variants >> of a "sticky" pageblock pageblock bit that prevents mixing. The risks was >> ending up in a context where memory within a suitable pageblock cannot >> be freed and all of the available MOVABLE pageblocks have at least one >> pinned page that cannot migrate from the allocating context. It can also >> potentially hit a case where the majority of memory is UNMOVABLE pageblocks, >> each of which has a single pagetable page that cannot be freed without an >> OOM kill. Variants of issues like this would manifestas an OOM kill with >> plenty of memory free bug or excessive CPu usage on reclaim or compaction. >> >> It doesn't kill the idea of the series at all but it puts a lot of emphasis >> in splitting the series by low-risk and high-risk. Maybe to the extent where >> the absolute protection against mixing can be broken in OOM situations, >> kernel command line or sysctl. > > Has a variant been previously considered where MOVABLE allocations are > allowed to come from UNMOVABLE blocks? After all, MOVABLE allocations > are generally, well, movable. So an UNMOVABLE allocation could try to > migrate pages from a MIXED pageblock in order to turn the MIXED pageblock > back into an UNMOVABLE pageblock. I might be completely off, but my understanding was that movable allocations can be happily placed into unmovable blocks if required already? IIRC, it's primarily the zone fallback rules that prevent e.g., ZONE_DMA to get filled immediately with movable data in your example. I might eb wrong, though. I guess what you mean is serving movable allocations much earlier from these other zones. Having memory hotunplug in mind ( as always ;) ), I'd expect that such fragmentation must be allowed to happen to guarantee that memory (esp. ZONE_MOVABLE) can be properly evacuated even if there are not sufficient MOVABLE pageblocks around to hold all that (movable) data. -- Thanks, David / dhildenb