Received: by 10.192.165.148 with SMTP id m20csp704326imm; Fri, 20 Apr 2018 14:05:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48LcVcYeSfCMztpsA87Liy52sh++KkrY6t4bv8Pk/8O8nNY7xlX6AuVyIDJ6uG9bokMYEx1 X-Received: by 10.99.116.74 with SMTP id e10mr9586510pgn.169.1524258335766; Fri, 20 Apr 2018 14:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524258335; cv=none; d=google.com; s=arc-20160816; b=Fd09WYo0PUfu7kWzZjjObpjxtjzvW8Ueo9rvgF6ff7MKMC2Th8rTXG7oGZvaVUAIbJ sH7PgfzjOF7evQsjvtZPMFx1iCFVj4ptD3kmvhUHXqS0YZLTmoUeFCjHWZ87bCbBkzEg wONwE2VBEKwapICBvIrOpmJa/SbTnGrpEp646hpDgJKEMbvTOwg7GiGOOZxzUe+RV0mD Ti2Z1RyF6zpz10hTUH0akDOqSKNPFY3MCa04Ghs6bfAd7Tj+mW0Mc2pYiSEiAMPEn+Ih VgW2BBe6yl1Gs+z9c83oRmWQ/MTudaP+oH3cgl0tuYh1SVNGiOm0LxnHYj0FMo3qBcum ebqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=BmbNhC/xE5PXfJjeSq6CmrXH23fkk8htRL4pFkq2l98=; b=VMxa/EjGmeZze9BVTf3UTimDSla/u2GUj9oM1F+FWIGHAblqSL3obXrXyoYKXygu2Q WXt3SlDnucjdv4YO+r3M56BZDfUhqqVId3Ky5qktcEAOTS4ggcmlH2934e2NuPu9D0wu Bz/2xovL2GJcNde/RuNVY54dTdSKy/rEEhKpN22FP2ffpX8YMnVnUBsdX2Bz0FIkC7OA kaB3Y5ccQaYPMHwLkUc0OyD25PTn2aaPCf2BOznxzuomL8TsT+blL+JiMPG0BsNQ/eA9 9PVtVprP+XJaJ/EMAR8gBaOMsfnPl1IW+7ZB43Yti97RvFI9f8GmMw9S26x1tHLPy7m5 F/lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Xmi/MlMW; 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 k189si5392854pgd.587.2018.04.20.14.04.58; Fri, 20 Apr 2018 14:05:35 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Xmi/MlMW; 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 S1752915AbeDTVCJ (ORCPT + 99 others); Fri, 20 Apr 2018 17:02:09 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48410 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbeDTVCH (ORCPT ); Fri, 20 Apr 2018 17:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BmbNhC/xE5PXfJjeSq6CmrXH23fkk8htRL4pFkq2l98=; b=Xmi/MlMWhMdHE3pPN8joy3Wj+ lgBdfMmCcJ6eq+aq9S/ncZXxdYohKhk9/9+yLKgKtgvTRma1PS9O28n3DtuACRPMKF/xWLBED9Xw+ D4IA+8jpz2CUeQnjJPANyNqSsRLRoPxMcT2KvcvTK977dI4jJTT2iER4F7ghPPBuViUBDuj2rESiv O8yc984TJ4Hdu1JJdswjyohXYzK0Kqm4shQBAXgSaLBNVXZiuklJYkEuquj8ArJZLJsTkJIW0d7Ke UuJPoJnYq9JJYu3R3LnIJZ+Z6DN1yWBI96QwKXBLfs9YO8J0JGbu98+lWb1thDmCD/QfolvwSYCm9 /DfH4tHoQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9dAP-0005YW-2I; Fri, 20 Apr 2018 21:02:01 +0000 Date: Fri, 20 Apr 2018 14:02:00 -0700 From: Matthew Wilcox To: Mikulas Patocka Cc: Michal Hocko , David Miller , Andrew Morton , linux-mm@kvack.org, eric.dumazet@gmail.com, edumazet@google.com, bhutchings@solarflare.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, dm-devel@redhat.com, Vlastimil Babka Subject: Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM Message-ID: <20180420210200.GH10788@bombadil.infradead.org> References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> <20180418.134651.2225112489265654270.davem@davemloft.net> <20180420130852.GC16083@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2018 at 04:54:53PM -0400, Mikulas Patocka wrote: > On Fri, 20 Apr 2018, Michal Hocko wrote: > > No way. This is just wrong! First of all, you will explode most likely > > on many allocations of small sizes. Second, CONFIG_DEBUG_VM tends to be > > enabled quite often. > > You're an evil person who doesn't want to fix bugs. Steady on. There's no need for that. Michal isn't evil. Please apologise. > You refused to fix vmalloc(GFP_NOIO) misbehavior a year ago (did you make > some progress with it since that time?) and you refuse to fix kvmalloc > misuses. I understand you're frustrated, but this is not the way to get the problems fixed. > I tried this patch on text-only virtual machine and /proc/vmallocinfo > shows 614kB more memory. I tried it on a desktop machine with the chrome > browser open and /proc/vmallocinfo space is increased by 7MB. So no - this > won't exhaust memory and kill the machine. This is good data, thank you for providing it. > Arguing that this increases memory consumption is as bogus as arguing that > CONFIG_LOCKDEP increses memory consumption. No one is forcing you to > enable CONFIG_LOCKDEP and no one is forcing you to enable this kvmalloc > test too. I think there's a real problem which is that CONFIG_DEBUG_VM is too broad. It inserts code in a *lot* of places, some of which is quite expensive. We would do better to split it into more granular pieces ... although an explosion of configuration options isn't great either. Maybe just CONFIG_DEBUG_VM and CONFIG_DEBUG_VM_EXPENSIVE. Michal may be wrong, but he's not evil.