Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4731257img; Tue, 26 Mar 2019 15:53:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDsmCfZ4kkckTWXPjaISMNHnZQfWd3MsnA+jaABDjGKAt2WtWqtQRcpr2QBOo/tuVfgGSQ X-Received: by 2002:a17:902:1101:: with SMTP id d1mr32585356pla.19.1553640783112; Tue, 26 Mar 2019 15:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553640783; cv=none; d=google.com; s=arc-20160816; b=LY9HYJvTqT4PPBsHbdM1D4+50ICKa5RDq7UcgQmFPWdJJy0yqrTRL2rMIcY38xx0jo PkhNUGE/VPeCCoLMb9eCYvtA/DjtXpjsxiNqiJKzMS7SYwxNAywR3rEYFIyLLDaKWTy4 7hsLdDCiTyBlWziML8h1vT4J0R3zbwS766iWqDGiVos++ho59eZClns5c3ugafR1Tzcs EprC7tBTY2Oce1YtkeSdD7v9xqLFLzprjh0ImLLgYsA+SP7WwKNdYdgD+0XhJmyVZGT6 MBIlbSk7Ge1t3fZZAuBSHdLqVbeuGpbxxP/svdhM6yf/tGW1GVl7MLd26m+rdMaBaYn6 u71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=k2K7y5i3c/bIxXtCts/FFPzx4K3yumcOwK4/9lIY7Rk=; b=n6/Z8xx0K+32JCuXvK2pJ8RRpEcExitGE69NGdPTV5WjyjAKexWrZeEPknQ6ncXacS XCNi2HmRPEWs+vV/HfT/ySJcM4X24FiWGWft0QKjf88HKkkuMknCQ4GPr8IKkSufoien ZIc9piCBfF76shQstPuW5mBaT231JRNNb5N5A/GDxPPcTfosRHD5QDuiDhgY838DIa9s p0/eM4JbuioUl104ppKu41gaSSF+VHX3f7fi+/C4C+SCqATnupP1vBPSRtuu9fsmEhNO mpFNtmdipAl6uYU9bXJV4fXfSvT5w91f9RfocHqaSCy8revoWKuaHRNTd02UKBzkDBEE 2Trw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=n5Ofe8zL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si8955195pgc.79.2019.03.26.15.52.47; Tue, 26 Mar 2019 15:53:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=n5Ofe8zL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731950AbfCZWwH (ORCPT + 99 others); Tue, 26 Mar 2019 18:52:07 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42601 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfCZWwH (ORCPT ); Tue, 26 Mar 2019 18:52:07 -0400 Received: by mail-qt1-f193.google.com with SMTP id p20so16678187qtc.9 for ; Tue, 26 Mar 2019 15:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=k2K7y5i3c/bIxXtCts/FFPzx4K3yumcOwK4/9lIY7Rk=; b=n5Ofe8zLAm9EvPjLhVdPsZ3yG+NXRr4zT84bTkHrv5sbGyhMdamxp8kmuZCee4HzOn vJkAbTon7PDVvYe3EFK7GVlOoVTOnjLB1CViUgGTK5uuYPXOw4ZLWKTOTm0NPo7Zx3Sf iyFHDIRg7FTnJ32MLxyOMtoh7uSbxAG16X3FZ3kd/muS5nMET3h4yolATvnTiHym2shp y8j4LbsQp7pv7TmRMcGCPehHXc2+FTM7JwFAubRsShJIAyU1frlyf/6DG3+h1adfDJ+y sr61X8iIfSJWKhqqF4WxmKwMvQD6uJSXvByvuPeB7NLgjwqjc3xGfKuBUVZMsO7kWFFT ywLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=k2K7y5i3c/bIxXtCts/FFPzx4K3yumcOwK4/9lIY7Rk=; b=PAZDmuzwneCHSW4ExZicuwjMvLXUfxAk7RlHVi4iZHyZc6dFIYDJ1SUICp4+zdY9l/ ZaiHhjFQh1Seppn2JY9IBprFarwqQykOuOSo4n26mAK5sqMOZclBhMGnrViyvmDfbEp9 GqbgVpx8HXIuGfT4wn7pYqugJjp6lK47ESqejbC5orSMTxKCmyaBhFzhBiCXZIBHhWd3 DREfZ/71QZg7m4uNGdkp/YkoQ6tqkMZv852UNAsh9ge+iOQuZTtzSmazzzLEarXUgWzj iT78jDBD7BTqM4HZgrXuShbI16pL9HjeguQpevcByUdyta4/qJdIzYa2H1fiGNv58s57 8cIA== X-Gm-Message-State: APjAAAVVG3hrS48Q4+0IAwrYvmEsWTxYdZAydtMP8jIxypGBmeJKHhGm c1tVisIW/i3Wmuh7eYengv/YTFiTYsY= X-Received: by 2002:ac8:17ee:: with SMTP id r43mr27012056qtk.169.1553640726411; Tue, 26 Mar 2019 15:52:06 -0700 (PDT) Received: from ovpn-120-94.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id p64sm12128427qkc.62.2019.03.26.15.52.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 15:52:05 -0700 (PDT) Subject: Re: [PATCH v3] kmemleaak: survive in a low-memory situation To: Catalin Marinas Cc: akpm@linux-foundation.org, mhocko@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20190326154338.20594-1-cai@lca.pw> <20190326160617.GG33308@arrakis.emea.arm.com> From: Qian Cai Message-ID: <2193546d-e525-b8d0-a643-53fea7391c86@lca.pw> Date: Tue, 26 Mar 2019 18:52:04 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20190326160617.GG33308@arrakis.emea.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/26/19 12:06 PM, Catalin Marinas wrote: > I wonder whether we'd be better off to replace the metadata allocator > with gen_pool. This way we'd also get rid of early logging/replaying of > the memory allocations since we can populate the gen_pool early with a > static buffer. I suppose this is not going to work well, as DMA_API_DEBUG use a similar approach [1] but I still saw it is struggling in a low-memory situation and disable itself occasionally. [1] https://lkml.org/lkml/2018/12/10/383