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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74022C433E0 for ; Sun, 28 Jun 2020 20:39:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C30C206C3 for ; Sun, 28 Jun 2020 20:39:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="XbDlEeon" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C30C206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6369E6B0003; Sun, 28 Jun 2020 16:39:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E8026B0005; Sun, 28 Jun 2020 16:39:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FC136B0006; Sun, 28 Jun 2020 16:39:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id 362616B0003 for ; Sun, 28 Jun 2020 16:39:28 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9BE53824556B for ; Sun, 28 Jun 2020 20:39:27 +0000 (UTC) X-FDA: 76979785974.03.ice13_500c01526e69 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 6B20128A4E9 for ; Sun, 28 Jun 2020 20:39:27 +0000 (UTC) X-HE-Tag: ice13_500c01526e69 X-Filterd-Recvd-Size: 4971 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Sun, 28 Jun 2020 20:39:26 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id cv18so2487941pjb.1 for ; Sun, 28 Jun 2020 13:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=38Ho/xvdHW5Z1VeggGn8+2kRLCRaHlHkAY+Gklbkx94=; b=XbDlEeon9NRRxC1MoyudbcxruUwQl0tcRbYzA5mztlejPR0clLlEheShbql1ZndCzZ Ip25H9746obUlOd/pil5UUPZvOLOdFIDszLObNx/63Sv0zDs71pDSIO3WspjCTvmmSne ieLdIBky334nuAfcrl1W+d+hKJjIV2DFsJMKCqmulEFfMtSHKX5jCZoutoy7R8XOhdEd jF9/VfqXq7bAXWD2SF9yPKivMRo17236Kd0d3uyoYaGop9sm/Z6LYgNvybbmo5QMuBRA 6KHKp42TsBVzoPWWj1jHcylRQGwomRH6ojsl4srvVlh0p8YekyUJeJofoLORXafFYvRY CTZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=38Ho/xvdHW5Z1VeggGn8+2kRLCRaHlHkAY+Gklbkx94=; b=k9SOy/0Ox+pLkMPSgQ3XLfXbxW67/d8Hos620sHsmxibekdWqGwhTCNUO3sfHrUsXR d1vJgshsfIgymxSKbM1E6nd7cy8xkSN2i8FAsqCIEZL32FEukEWFhpyb8Vqe0K4+0AGx CqVlHOmwXY5xypb299rr9krhYRBUIp3pXL8yP2mw81+cBagjUF8XiLMJFABf1LV5ZCQ3 SpBdAiM0llvGf0D1tPJkRgIu6rkCCm6Ha8bBFfpZJU15KM/pJpIcllFkMkiZy61b8QH4 5ZhFIrqwW7sTO/PJjauC7hu9829tpqpwkBID7V2wAE+EAJR+XMWjZ6e+nTa4x7avoBGm vEKw== X-Gm-Message-State: AOAM5311ijD9lek4UvvA3fzD2wOjIeHV/YmeVEuzMXdNTu8alr3+nk8m M6q6kXDw72xdlMIlFhCNgIodUw== X-Google-Smtp-Source: ABdhPJxPCPe1ZWtfc0wOCLJxA5wSVdsBfHkXbR3keRSUj9u+h11JHgkwaOo+XbEpqbX9ACUTPmlloA== X-Received: by 2002:a17:90a:218c:: with SMTP id q12mr13203070pjc.116.1593376765779; Sun, 28 Jun 2020 13:39:25 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id b19sm16715015pjo.57.2020.06.28.13.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2020 13:39:25 -0700 (PDT) Date: Sun, 28 Jun 2020 13:39:24 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: =?UTF-8?Q?=E5=AD=99=E4=B8=96=E9=BE=99_sunshilong?= cc: David Hildenbrand , linux-mm@kvack.org Subject: Re: Are there still some methods that could be used by the Linux kernel to reduce memory fragmentation while both CONFIG-MIGRATION and CONFIG-COMPACTION are disabled? In-Reply-To: Message-ID: References: <73b5db17-805a-4f1a-60f7-26695c0422e8@redhat.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1482994552-2097656402-1593376765=:708072" X-Rspamd-Queue-Id: 6B20128A4E9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1482994552-2097656402-1593376765=:708072 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 28 Jun 2020, =E5=AD=99=E4=B8=96=E9=BE=99 sunshilong wrote: > >>Are there still some methods that could be used by the Linux ker= nel > >> to reduce memory fragmentation? > > > >Without compaction or migration, that's just about it. > Do you mean there are no other methods that could be used to > achieve this goal? >=20 Without compaction and migration, we don't have the ability to move pages= =20 around for defragmentation so any strategy can only be used at allocation= =20 time. __rmqueue_smallest() will attempt to take the smallest possible free page= =20 to leave higher order pages available in an attempt to consolidate=20 allocations on the smallest set of pageblocks as possible given the=20 allocation migratetype. When we do have to fallback to a pageblock of a different migratetype, we= =20 take the largest possible free page and convert it over if it's at least=20 half free for subsequent allocations of the desired migratetype. That's the extent that we can do this at allocation time. --1482994552-2097656402-1593376765=:708072--