Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oin34-0001SJ-LC for mharc-grub-devel@gnu.org; Wed, 12 Oct 2022 21:30:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oin33-0001SB-4w for grub-devel@gnu.org; Wed, 12 Oct 2022 21:30:09 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:37721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oin31-0003lq-90 for grub-devel@gnu.org; Wed, 12 Oct 2022 21:30:08 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d24so501030pls.4 for ; Wed, 12 Oct 2022 18:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G/3JmuHlxbHC3uxBH9ufkoXfJ0ML+dwXGoM6V2h6El8=; b=HM1ZhBLCKOSdzl4Jxd6hVP9oZ3k8dajrlmxkIlNcyQGj832GsWtOE2bxBJ9Sf0Nsc6 6S/fj1lV1EpDbbICtCR6HtguNVgSgd/tMt4LfIkqH/qX+TDvYT/fyVxnYxGgma0Mcuw9 4WI2ksT4vEhSJOcXFk1rEF9GWca8xf2wOPtAjEeTlZBZz2rFGzJz892RQec11+Oo48R8 x3ttEr07JiD8WvC3OjcunGexN/wykSvQEP//i1yPVYkYKXW7eDK+ogfjTSXBEf1hgBQC ZI9dP/lHJy+4NlNfPT721YddNd6WFXTwhZEaBdJJLl6X+qiow+V5gArnpK100+40jqG4 obCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G/3JmuHlxbHC3uxBH9ufkoXfJ0ML+dwXGoM6V2h6El8=; b=z3CmjyRjlhBVv5uztZ25Nr6E4mCgQlmNRSnfq9UihYuwzCxKimwkfgdZJYwD2RAavB p4iXrlyicW0q16cZpISUEhoKdzwGBgWkf/DP+i25T6mmbrh00APDTsMtxJUcimJs7+Dd cDQ8mlYc5aAl7lSciBY76g05s3xlnJmaQkWcFlnkfm7KQ9AneftacUiyJh0oLjqQjQDz BytXiDUP1l55lrCJswLeY1ZiVygRtAABEU0shB/PeP3ElMpYu3FUrBYPbWqS4pzgDnXG kqVdf6xh9eOQ0ZhtMOKVJl5bPvgDySZFqCMxbT1YfoVtQiinV0/edTciKsij9jyf4kHx F6/Q== X-Gm-Message-State: ACrzQf2oiV2IyMA0H19bu/nuIOlMOirKqF0t9s4bJikDv6O51sIOEnal dQSFWpNxB/G16u5Olp1yPxxzW3AnC6LLAw== X-Google-Smtp-Source: AMsMyM7wiO2GLF/wVx7/aI1iyqZQq8YX8re0J0/g8U3sk0DEhOD50aC6eDiQhaQqIzdBnLCO/cgZog== X-Received: by 2002:a17:902:e0c1:b0:180:1aec:1f12 with SMTP id e1-20020a170902e0c100b001801aec1f12mr30165418pla.155.1665624605515; Wed, 12 Oct 2022 18:30:05 -0700 (PDT) Received: from localhost.localdomain (ec2-13-113-80-70.ap-northeast-1.compute.amazonaws.com. [13.113.80.70]) by smtp.gmail.com with ESMTPSA id z20-20020a63e554000000b0046a1c832e9fsm1971807pgj.34.2022.10.12.18.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 18:30:05 -0700 (PDT) From: Zhang Boyang To: grub-devel@gnu.org Cc: dkiper@net-space.pl, ps@pks.im, jim945@mail.ru, glin@suse.com, dja@axtens.net, droidbittin@gmail.com, heinrich.schuchardt@canonical.com, langner.marcel@myiq.de, marcan@marcan.st Subject: [RFC PATCH v3 0/2] mm: Better handling of regions Date: Thu, 13 Oct 2022 09:29:17 +0800 Message-Id: <20221013012919.173082-1-zhangboyang.id@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=zhangboyang.id@gmail.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2022 01:30:09 -0000 Hi, Change from V2: 1. Splited into two patches. One deal with the disk cache problem. The other is focused on improvement. 2. Add types to regions. So small and large allocations are effectively seperated into different heaps. This facility can also seperate module segments and plain data chunks. 3. Region management costs are now denoted by GRUB_MM_MAX_COST, seperated from GRUB_MM_GROW_SMALL ( =GRUB_MM_HEAP_GROW in previous patch). Some notes for the size of heap growth: In order to guarantee the success of allocation when heap exhausted, the new region size should be at least (size + align + GRUB_MM_MAX_COST). For small chunks, it's adjusted to (GRUB_MM_GROW_SMALL + GRUB_MM_MAX_COST) to improve performance. Best Regards, Zhang Boyang