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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 30942C433E6 for ; Fri, 5 Feb 2021 22:47:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3C4064FD7 for ; Fri, 5 Feb 2021 22:47:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3C4064FD7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 12D126B0006; Fri, 5 Feb 2021 17:47:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DCA66B006C; Fri, 5 Feb 2021 17:47:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE73E6B006E; Fri, 5 Feb 2021 17:47:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id D694A6B0006 for ; Fri, 5 Feb 2021 17:47:22 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9C5EF1EF1 for ; Fri, 5 Feb 2021 22:47:22 +0000 (UTC) X-FDA: 77785701924.10.rest04_440655e275e8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 7C13416A4B0 for ; Fri, 5 Feb 2021 22:47:22 +0000 (UTC) X-HE-Tag: rest04_440655e275e8 X-Filterd-Recvd-Size: 5131 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 22:47:21 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id m12so4416895pjs.4 for ; Fri, 05 Feb 2021 14:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9BnXZ/PFgv+PaZ+o1kNDJW5+yPYW/zbcZCYaFlhNaas=; b=ERByx7E+FwFwxJ3d0S7TCl5oQ+5IPBNEnlrbb59y9odPmtXRJ5Q4QgcXKTdkGKVfTU 3tAeOOwZ9B1UfU9HaxaTgRCpwjPMYwA4Y8EcZLFmT5wpff8QwEoFXaUjPeGlMbnOTAXo nwhG+jb/1yr4VYh9P7Pl2BeR66JONsO5wIISNkNzPseaap0SHN7slbbHI3doSNGy8eD9 Fq+m0j6Z0odGrK7u23Tl8sFRZA/dH5+aUIa3Cp5cP29FLOB7LCyR+Obrew3jD09kN1mq z5Mm9mXDcCzkDj4UPAKcdG2NzBKoAwQKrLI1rHHC8f+fRL08i8fz2lhsww12XNrdUokk BEDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=9BnXZ/PFgv+PaZ+o1kNDJW5+yPYW/zbcZCYaFlhNaas=; b=rzsc3RDWW3RVEV8HcsK/iZGzjl5yisjIGEgWMe7m1XdjkKOkvYgKF4dV068u4Dfgoy zmAOR6wq3lYZ7CGBfcs3j2xfvMLgFy166O6NXSvM583+ihUGR1gHla3MDL8ZZH+2Z5/L RIu0RDglAZDbc1ofmR+wsJnRPN2Z5akMz9Z8sTm1dZlEG2yE+LmVvUU3GIFV5ads7v9G ubwq7S++qQhNg+d3wvFvZJw9CQ0qRWBJRu4csUEEbFTFAfxv5XgtdNmO/zU3H3SyRZO4 UgTKKC7MgKuLGVWgXmmDoZUq7LCt0lgKcQ6y/WelnqVgnq6GvTBABqaqN5sk9torPaB2 P15Q== X-Gm-Message-State: AOAM5334Ek1fB2KwzIhLrsWGf6Tny2rTS1Q3oWqsTAEd+5lwFIfFzmdW 6WBla04DIio+tAWR8qu3t7CrZ/4mXk8= X-Google-Smtp-Source: ABdhPJxpG09XuDAWmTFw53mKpO8bI4+yGgzw50FAPRzNQTY84IrAGp32cWQW0MMK+PC+VXp7Hb1POg== X-Received: by 2002:a17:902:102:b029:e1:2a4c:61ed with SMTP id 2-20020a1709020102b02900e12a4c61edmr6273328plb.61.1612565241129; Fri, 05 Feb 2021 14:47:21 -0800 (PST) Received: from google.com ([2620:15c:211:201:708b:34cf:3e70:176d]) by smtp.gmail.com with ESMTPSA id a24sm11567954pff.18.2021.02.05.14.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 14:47:20 -0800 (PST) Date: Fri, 5 Feb 2021 14:47:18 -0800 From: Minchan Kim To: John Hubbard Cc: Suren Baghdasaryan , Andrew Morton , Greg Kroah-Hartman , John Dias , LKML , linux-mm Subject: Re: [PATCH] mm: cma: support sysfs Message-ID: References: <71c4ce84-8be7-49e2-90bd-348762b320b4@nvidia.com> <34110c61-9826-4cbe-8cd4-76f5e7612dbd@nvidia.com> <269689b7-3b6d-55dc-9044-fbf2984089ab@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000254, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Feb 05, 2021 at 01:58:06PM -0800, John Hubbard wrote: > On 2/5/21 1:52 PM, Suren Baghdasaryan wrote: > > > > > I takes your suggestion something like this. > > > > > > > > > > [alloc_range] could be order or range by interval > > > > > > > > > > /sys/kernel/mm/cma/cma-A/[alloc_range]/success > > > > > /sys/kernel/mm/cma/cma-A/[alloc_range]/fail > > > > > .. > > > > > .. > > > > > /sys/kernel/mm/cma/cma-Z/[alloc_range]/success > > > > > /sys/kernel/mm/cma/cma-Z/[alloc_range]/fail > > > > The interface above seems to me the most useful actually, if by > > [alloc_range] you mean the different allocation orders. This would > > cover Minchan's per-CMA failure tracking and would also allow us to > > understand what kind of allocations are failing and therefore if the > > problem is caused by pinning/fragmentation or by over-utilization. > > > > I agree. That seems about right, now that we've established that > cma areas are a must-have. Okay, now we agreed the dirction right now so let me do that in next version. If you don't see it's reasonable, let me know. * I will drop the number of CMA *page* allocation attemtps/failures to make simple start * I will keep CMA allocation attemtps/failures * They will be under /sys/kernel/mm/cma/cma-XX/success,fail * It will turn on CONFIG_CMA && CONFIG_SYSFS Orthognal work(diffrent patchset) * adding global CMA alloc/fail into vmstat * adding alloc_range success/failure under CONFIG_CMA_ALLOC_TRACKING whatever configuration or just by default if everyone agree Thanks.