Received: by 10.192.165.148 with SMTP id m20csp718476imm; Fri, 20 Apr 2018 14:24:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Igb5lf1r8yWw/mT0Wz+6FO4UHiyESk/A0jpf/DMMq/juf04qTw2bFMZheJG2+2+bdLTtc X-Received: by 10.99.190.67 with SMTP id g3mr7368586pgo.53.1524259492024; Fri, 20 Apr 2018 14:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524259491; cv=none; d=google.com; s=arc-20160816; b=pMh/v3ItKxcZzRzsd7jTXDpMhBHE2OBM4cNMqXr5yStPGdsDaphuoZE1GI7XFoUrdc lyfzRptvEdlFmPQ91r7xdZPdipRmZTpWYWD4urRlBHlMbVoKecAwom7Eejqj9AJ1e9oN EwIvwpKmCgsdbQ3sAmCOQ7bZMGTMy5fGb3vNwmv758EAESHU6R4yTfTDAewiGL0PaLxN mQ6lpKwlqi0EmAgUIlkI6eTTkme6nXkFg44rtdm3dp2dPzlwL9zuX2kaCEYm/Vycd8Ka odx6VwegXOVnNZG7nnE/krW9rVLhsmE7Vkwqcyplr1dvd+RStyn1SRQmtKldu9BUdrkI FoSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=14sAu6YjS6X+U32Pbv3M/GJ3Gq2FLX4zDM4bU89G/2w=; b=OWoI9zOxyY7htG13HABq/ybDaVIKnv9r8lw0MwpR1mJ2i7V1Ee0+t8h0iNK2A7Bsyd Q+xsyOqphIH4yqKBalsymjlJ+EZe763vKhuQgBRLYIZSnXBxrI7LdCliitTokBJPDsw0 5QI6sv0H/Vlx+/2UyGCyrg4aRexC3Sy9i2jrdm8Pn+t01HlZSlv/HFxkx7h2NgeI27Md wZ4nGx8mMUGZZbDbap0gQsl2yWpW5OhAzEi7Dk1xjew7Su/MXzpPk3p3OZklE3Ikt3yw CVLdBIuYe8HuNSchQdP7HvXbMN4eaaRIWm9pv6LcrLavME0h+qzra65o1TliIBDJCPx8 U02A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 189si2384997pgi.254.2018.04.20.14.24.13; Fri, 20 Apr 2018 14:24:51 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbeDTVV3 (ORCPT + 99 others); Fri, 20 Apr 2018 17:21:29 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43552 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751228AbeDTVV1 (ORCPT ); Fri, 20 Apr 2018 17:21:27 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9E8E40704A9; Fri, 20 Apr 2018 21:21:26 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1B752024CA1; Fri, 20 Apr 2018 21:21:26 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w3KLLQaH002580; Fri, 20 Apr 2018 17:21:26 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3KLLQ5q002576; Fri, 20 Apr 2018 17:21:26 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 20 Apr 2018 17:21:26 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Matthew Wilcox 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 In-Reply-To: <20180420210200.GH10788@bombadil.infradead.org> Message-ID: References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> <20180418.134651.2225112489265654270.davem@davemloft.net> <20180420130852.GC16083@dhcp22.suse.cz> <20180420210200.GH10788@bombadil.infradead.org> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 20 Apr 2018 21:21:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 20 Apr 2018 21:21:26 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Apr 2018, Matthew Wilcox wrote: > 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. I see this attitude from Michal again and again. He didn't want to fix vmalloc(GFP_NOIO), he didn't want to fix alloc_pages sleeping when __GFP_NORETRY is used. So what should I say? Fix them and you won't be evil :-) (he could also fix the oom killer, so that it is triggered when free_memory+cache+free_swap goes beyond a threshold and not when you loop too long in the allocator) > > 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. I already said that we can change it from CONFIG_DEBUG_VM to CONFIG_DEBUG_SG - or to whatever other option you may want, just to make sure that it is enabled in distro debug kernels by default. Mikulas