Received: by 10.192.165.148 with SMTP id m20csp4797220imm; Tue, 24 Apr 2018 08:33:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpmec+myZIk0fcUfHk0TLLaxOceBRsxiQZ9Pnl41inm4FsDWx+Z5ork3ja5uVvYSDiGzjLA X-Received: by 2002:a17:902:b945:: with SMTP id h5-v6mr3415725pls.321.1524584004217; Tue, 24 Apr 2018 08:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524584004; cv=none; d=google.com; s=arc-20160816; b=yVnK63ewN0mNWZQxFPFueXjsiwSo0McvBr4rUvjbwstBynrl2BE4bHio++WoNPzyG3 XUAwXvDW0P8LnGdXWzq7gGU4lNXTt7rCQPgZgShlX7jmkaQyw5ORT+Z9gZHG40wogkcX 2ecWRqFU4vy+dNuQDOUTSSt4TrVRjn5TwvaAIeOtvoBe1QBujGHaciD/6Hg6sZM7omOs Rv2ggDRB/Ezrb9yiBVv2L7Rh9ovuo8kt7xZjY8xiabK0Ozje41ezDbVTDFdgAtK8SqL1 wNLQlL+aBEj9RApCMOkUkMRxbGWp8T+71CySybYltXHDYnKS2s9QI0BDeiknejDEqDKh v3HQ== 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=6mKOu/LBLNkPFBPYNV8gr9IAEHQ5HDh+LPH+GdFD6z0=; b=yTkeY9QOEn+cws+cqc9AtwGU4hRThD/XFkXFhXD28OGjIJGFsjvEy4ZcZJarT4F5nT MbDZM1esdJ+ganiN7MkIOGwrl03xSdL55v1xtQFFU3/SIY8VTZ0Dpa5FtvTHivXBac1Q jGt2zPAc55Yskf9FwQ1ezkMHJgP2en3p90DB3mS+4OZufz8wjpsSWwdWO9wCUsPhiqVY 6f6jNQriOODbD6fHx7pRDQvhiJyeKgtGxFFM/9g1djlRDrF3zba0wIeCJyoElF8Fh4jg v30Uz6KnLXVAwkrVv/m4pP/L7ewIm+FMua92vmlynpXoMoaOy9uCFwLci4JTvvbdPsj5 9hvg== 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 m77si14085134pfk.56.2018.04.24.08.33.09; Tue, 24 Apr 2018 08:33:24 -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 S1751445AbeDXPat (ORCPT + 99 others); Tue, 24 Apr 2018 11:30:49 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750757AbeDXPaq (ORCPT ); Tue, 24 Apr 2018 11:30:46 -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 89D274270947; Tue, 24 Apr 2018 15:30:45 +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 F34C21227721; Tue, 24 Apr 2018 15:30:40 +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 w3OFUe2P012304; Tue, 24 Apr 2018 11:30:40 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3OFUeip012298; Tue, 24 Apr 2018 11:30:40 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 24 Apr 2018 11:30:40 -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, 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: <20180424133146.GG17484@dhcp22.suse.cz> Message-ID: References: <20180420130852.GC16083@dhcp22.suse.cz> <20180420210200.GH10788@bombadil.infradead.org> <20180421144757.GC14610@bombadil.infradead.org> <20180423151545.GU17484@dhcp22.suse.cz> <20180424133146.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.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 24 Apr 2018 15:30:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 24 Apr 2018 15:30:45 +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 Tue, 24 Apr 2018, Michal Hocko wrote: > On Mon 23-04-18 20:25:15, Mikulas Patocka wrote: > > > Fixing __vmalloc code > > is easy and it doesn't require cooperation with maintainers. > > But it is a hack against the intention of the scope api. It is not! You can fix __vmalloc now and you can convert the kernel to the scope API in 4 years. It's not one way or the other. > It also alows maintainers to not care about their broken code. Most maintainers don't even know that it's broken. Out of 14 subsystems using __vmalloc with GFP_NOIO/NOFS, only 2 realized that its implementation is broken and implemented a workaround (me and the XFS developers). Misimplementing a function in a subtle and hard-to-notice way won't drive developers away from using it. > > > > 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. > > > > > > I didn't NACK the patch AFAIR. I've said it is not a good idea longterm. > > > I would be much more willing to change my mind if you would back your > > > patch by a real bug report. Hacks are acceptable when we have a real > > > issue in hands. But if we want to fix potential issue then better make > > > it properly. > > > > Developers should fix bugs in advance, not to wait until a crash hapens, > > is analyzed and reported. > > I agree. But are those existing users broken in the first place? I have > seen so many GFP_NOFS abuses that I would dare to guess that most of > those vmalloc NOFS abusers can be simply turned into GFP_KERNEL. Maybe > that is the reason we haven't heard any complains in years. alloc_pages reclaims clean pages and most hard work is done by kswapd, so GFP_KERNEL doesn't cause much issues with writeback. But cheating isn't justified if you can get away with it. Incorrect GFP flags cause real problems with shrinkers - because shrinkers are called from alloc_pages and they do respond to GFP flags. I had reported deadlock due to GFP issues (9d28eb12447). And the worst thing about these bug reports is that they are totally unreproducible and I get nothing, but a stacktrace in bugzilla. I had to guess what happened and I couldn't even test if the patch fixed the bug. I'm not really happy that you are deliberately leaving these issues behind and making excuses. Mikulas