Received: by 10.192.165.148 with SMTP id m20csp3470562imm; Mon, 23 Apr 2018 07:08:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Bj4ui5DDymEOuOESI4FJtUhubUUIjYSlZhhwgfvjyUTDSzjgS1Mp4edDlwovLKIVOZtGy X-Received: by 10.101.74.69 with SMTP id a5mr17613400pgu.32.1524492526708; Mon, 23 Apr 2018 07:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524492526; cv=none; d=google.com; s=arc-20160816; b=pep/7/TBvnQz304M3jZTwwhnBmCHddxWInK5r16L9Q8cgAckPrVNpAMfKORq22MBRa hTyOznQP3OApaxrgwrRRRntAMRWM/WysZ9FAMy7WeMPuDR4gOzNHjlRwQq8dIVj+VMnG UWP/dvSboy5iwky22LgXyvp72mh6ID7duRhsTq6StlgFHCz3rlDjcCzEn791jgZwfVE1 /NOZ4Qv+HdPbGBWbLJZmmDyQhBrILmvmEHM9JikBK1ItqeO/Qvc0sLjAqqFQEw4S0+Wh jG0Bbo/GucoJwS5IpdReoIrSobvRy5wr97XOkPvjpl+piaQU2PpvkblbFurjDl+rMpa/ TYTA== 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=PbYRw96m4V3BpgB0fXdazVeN7FYDFNXNCV2/t/IDD3c=; b=wos2j3wHhK/DqDNG/iqjsutTSLkVqG3LgLUrPTSKRZZP54veJ57r9DP/hxa6XfJDxO yfEgWLXbXsR74O2g42Yz0ItFnt8rWLA58O8N6cEh3YjJOIcjFuSbNSIxkHo6nQqJYlSd SdicE/x5PQeKfDlAC5EEYaKTi5+1rXB3C0x8emFa5srM4OON28FTDt28NkW0s71eQyuB RTafIdmxxH4TUYjUkSbFoOLS5Ocl7vAh9BQOgChIDDrdhcHtwB8fA2n1Sxphh3nN8YEa h7GH/0noN/wOsI+HHbCJJ2urk+JvmxflVfRqfV+h0ZvnuNPQgYSk/gzLSqljNlbF8+O1 Tp5A== 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 g6si9640985pgq.321.2018.04.23.07.08.32; Mon, 23 Apr 2018 07:08:46 -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 S1755315AbeDWOGT (ORCPT + 99 others); Mon, 23 Apr 2018 10:06:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753999AbeDWOGO (ORCPT ); Mon, 23 Apr 2018 10:06:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47DDDFB67F; Mon, 23 Apr 2018 14:06:14 +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 BB5231208F73; Mon, 23 Apr 2018 14:06:09 +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 w3NE69Gs028710; Mon, 23 Apr 2018 10:06:09 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3NE68qS028706; Mon, 23 Apr 2018 10:06:09 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Mon, 23 Apr 2018 10:06:08 -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, 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: <20180421144757.GC14610@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> <20180421144757.GC14610@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.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 23 Apr 2018 14:06:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 23 Apr 2018 14:06:14 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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 Sat, 21 Apr 2018, Matthew Wilcox wrote: > On Fri, Apr 20, 2018 at 05:21:26PM -0400, Mikulas Patocka wrote: > > 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. > > Fine; then *say that*. I also see Michal saying "No" a lot. Sometimes > I agree with him, sometimes I don't. I think he genuinely wants the best > code in the kernel, and saying "No" is part of it. > > > He didn't want to fix vmalloc(GFP_NOIO) > > I don't remember that conversation, so I don't know whether I agree with > his reasoning or not. But we are supposed to be moving away from GFP_NOIO > towards marking regions with memalloc_noio_save() / restore. If you do > that, you won't need vmalloc(GFP_NOIO). He said the same thing a year ago. And there was small progress. 6 out of 27 __vmalloc calls were converted to memalloc_noio_save in a year - 5 in infiniband and 1 in btrfs. (the whole discussion is here http://lkml.iu.edu/hypermail/linux/kernel/1706.3/04681.html ) He refuses 15-line patch to fix GFP_NOIO bug because he believes that in 4 years, the kernel will be refactored and GFP_NOIO will be eliminated. Why does he have veto over this part of the code? I'd much rather argue with people who have constructive comments about fixing bugs than with him. (note that even if the refactoring eventually succeeds, it will not be backported to stable branches. The small vmalloc patch could be backported) > > he didn't want to fix alloc_pages sleeping when __GFP_NORETRY is used. > > The GFP flags are a mess, still. That's the problem - the flag doesn't have a clear contract and the developers change behavior ad hoc according to bug reports. > > So what should I say? Fix them and you won't be evil :-) > > No, you should reserve calling somebody evil for truly evil things. How would you call it? Michal falsely believes that a 15-line patch would prevent him from doing long-term refactoring work and so he refuses it. > > 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. > > Yes, and I think that's the right idea. So send a v2 and ignore the > replies that are clearly relating to an earlier version of the patch. > Not everybody reads every mail in the thread before responding to one they > find interesting. Yes, ideally, one would, but sometimes one doesn't. I sent the CONFIG_DEBUG_SG patch before (I wonder why he didn't repond to it). I'll send a third version of the patch that actually randomly chooses between kmalloc and vmalloc, because some abuses can only be detected with kmalloc and we should test both. For bisecting, it is better to always fallback to vmalloc, but for general testing, it is better to test both branches. Mikulas