Received: by 10.192.165.148 with SMTP id m20csp3489457imm; Mon, 23 Apr 2018 07:25:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx48DnkTEdEuAaheGklft+R4ZepiPWHsMOXHL6HoxH3+qTZUUQxM+z/BQGQlP20AGNDO8hqdu X-Received: by 10.98.47.2 with SMTP id v2mr16536208pfv.239.1524493540149; Mon, 23 Apr 2018 07:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524493540; cv=none; d=google.com; s=arc-20160816; b=ID9c56EB6u4FUFO6mIHmOL27zLNd+ufTxPZfzANvFw+DrYv7ll6CHP8G/mxR9qW7Vq g+OhDJ0uQ0lODBoCHN6uoQomfJt4/OISumE1irNTHW8ew8yTaO1NmcvD3/6eODNTTIzT vdY0Sw8h5LPTTSFDe/lGUdq+kDkuKFMLJZ38cN+dbU8JPjVpcW/O3T/N4eEnJssW93c7 GzsCjRLWLCJnSHlQpVFauDnCDHnjVbQYQYG8dYQxFHwg/qiG6LoB2yykMLrRme89MFlX zdl62XZLVqZxmB6+eCvePviIqC1l3t89I/7wao3KTjTPP/qQMx5lcvuRQpOXhejUY7W/ JYhA== 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=fp/mXqfk/e4IAdnGty7rzq+JBr+4FPAwwdjbZls6dsk=; b=Gzo4GsSnv54viE6QNalJ81+BJ6leMbZSCAWUs5iPfHSBNWyNtj93p4D7vJ7NV0GPj2 R/X5t704yipXVsLCNOHPEEWBqbWpfvBeX2+JTDtigcsYLEf2zIO2U2q+wOW/jI9kosNh Sb5JuL4G/mqD0uDEKZ0RDuVWzDe9pi3OqB/hIG5RkXTFBHYS0njkb6Sg0+T0FWp0u5BR QjvhmfNWg9PY8/CTmjmNB4Zne2gujq/JyD3i6px3QXfD+f91T5ruolsmU3R2Nizh7Ykd 3tWhHQLFlJp2Fy1btybgmsaLt8LOeLWYs8OLklCyp1PTm4jQ7ieQ0M0nxB/MKGSLZbMS JcGw== 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 9-v6si11716331plf.283.2018.04.23.07.25.25; Mon, 23 Apr 2018 07:25:40 -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 S1755508AbeDWOYH (ORCPT + 99 others); Mon, 23 Apr 2018 10:24:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755335AbeDWOYE (ORCPT ); Mon, 23 Apr 2018 10:24:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E84E4305D24; Mon, 23 Apr 2018 14:24:03 +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 C7B5E2166BAD; Mon, 23 Apr 2018 14:24:02 +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 w3NEO21R031641; Mon, 23 Apr 2018 10:24:02 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3NEO2S4031637; Mon, 23 Apr 2018 10:24:02 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Mon, 23 Apr 2018 10:24:02 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Michal Hocko cc: Matthew Wilcox , 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: <20180422130356.GG17484@dhcp22.suse.cz> 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> <20180422130356.GG17484@dhcp22.suse.cz> 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.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Apr 2018 14:24:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Apr 2018 14:24:03 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 Sun, 22 Apr 2018, Michal Hocko wrote: > On Sat 21-04-18 07:47:57, Matthew Wilcox wrote: > > > > 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). > > It was basically to detect GFP_NOIO context _inside_ vmalloc and use the > scope API to enforce it there. Does it solve potential problems? Yes it > does. Does it solve any existing report, no I am not aware of any. Is > it a good fix longterm? Absolutely no, because the scope API should be > used _at the place_ where the scope starts rather than a random utility > function. If we are going the easier way now, we will never teach users > to use the API properly. And I am willing to risk to keep a broken > code which we have for years rather than allow a random hack that will > seemingly fix it. > > Btw. I was pretty much explicit with this reasoning when rejecting the > patch. Do you still call that evil? You are making nonsensical excuses. That patch doesn't prevent you from refactoring the kernel and eliminating GFP_NOIO in the long term. You can apply the patch and then continue working on GFP_NOIO refactoring as well as before. > > > he didn't want to fix alloc_pages sleeping when __GFP_NORETRY is used. > > > > The GFP flags are a mess, still. > > I do not remember that one but __GFP_NORETRY is _allowed_ to sleep. And > yes I do _agree_ gfp flags are a mess which is really hard to get fixed > because they are lacking a good design from the very beginning. Fixing > some of those issues today is a completely PITA. It may sleep, but if it sleeps regularly, it slows down swapping (because the swapping code does mempool_alloc and mempool_alloc does __GFP_NORETRY allocation). And there were two INTENTIONAL sleeps with schedule_timeout. You removed one and left the other, claiming that __GFP_NORETRY allocation should sleep. > > > 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. > > And look here. This is yet another ad-hoc idea. We have many users of > kvmalloc which have no relation to SG, yet you are going to control > their behavior by CONFIG_DEBUG_SG? No way! (yeah evil again) Why aren't you constructive and pick up pick up the CONFIG flag? > Really, we have a fault injection framework and this sounds like > something to hook in there. The testing people won't set it up. They install the "kernel-debug" package and run the tests in it. If you introduce a hidden option that no one knows about, no one will use it. > -- > Michal Hocko > SUSE Labs Mikulas