Received: by 10.192.165.148 with SMTP id m20csp286961imm; Fri, 20 Apr 2018 06:50:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49q6dNH7kDcozoFQ+BMXx+3ycbNDhtvAHVZvRvRRRVh7mRZfid/aZKRjjGdkY4eiCk/SUJt X-Received: by 2002:a17:902:a50d:: with SMTP id s13-v6mr10211608plq.228.1524232258878; Fri, 20 Apr 2018 06:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524232258; cv=none; d=google.com; s=arc-20160816; b=scwqodogPFARZhK1Gq9JmtgG3sn0Y7OlkcrXuc6CK+719rJO9yca0NLvHwGU5YFfvp SgIv46CdHWxUG2UVVeUEQ9dwLP8xZg+dgblYBz/QJ605BnUivGy0OtRwyn69est14J45 /hQpi5odgH77z3MmrS3dKCxUjCQRuRSMAsBd3EZNmnOlV+lI6zw1/BQEPWs7ePgev82+ FnSjhfKVXQUuSbWRm4tbvhfECzMy39SNgNcTZqsaf5BfJ0425numBrmLuYOzw4BJ87K7 g9JouFzfSShO2whTEhBGKKfoZGLwfp16yB58v4R+TmXtF9gQZ22n3iWwN/1EQktqmJST VoPg== 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:arc-authentication-results; bh=cmqLEv+vj17fpznQdRuVrzC4J+L2YVErZ8TWHtytktw=; b=gqPcxRGGRACsnodzhRhCM56Kyggn/AnuSHqrXbJp3HDNnzw5I7vjGIeJi59leLak+Q KDwoD/8H0998O/Og2ieb6sXxwrbZzlLA9Mx3Jv+wLadpmOT6RfC8YYS+SIfULKC5tgpI dP/bPI74GO80TvRNw20PGlR4qE+NldUzL1q9XkdWYcKqlD3a/S0Xv7W6YK90/7/pb9ln i7TdZ9Yddg1mjKDrIiXGOj3oMDnSZr+ggOSydm6oxf+WCjFEUMdlV5Gp1hqkxlSIgfka hS662Rztp7koJiuH3cPATsXn4+9IR2PKemceGgCJ7xPswIh2eU1Ao8euA+RLFAvIiqLy uH4g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si4756608pgo.305.2018.04.20.06.50.43; Fri, 20 Apr 2018 06:50:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755174AbeDTNtH (ORCPT + 99 others); Fri, 20 Apr 2018 09:49:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:54801 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754913AbeDTNtG (ORCPT ); Fri, 20 Apr 2018 09:49:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A1767AEA2; Fri, 20 Apr 2018 13:49:04 +0000 (UTC) Date: Fri, 20 Apr 2018 15:49:01 +0200 From: Michal Hocko To: Matthew Wilcox Cc: Mikulas Patocka , 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: <20180420134901.GB17484@dhcp22.suse.cz> References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> <20180418.134651.2225112489265654270.davem@davemloft.net> <20180420130852.GC16083@dhcp22.suse.cz> <20180420134136.GD10788@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180420134136.GD10788@bombadil.infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 20-04-18 06:41:36, Matthew Wilcox wrote: > On Fri, Apr 20, 2018 at 03:08:52PM +0200, Michal Hocko wrote: > > > In order to detect these bugs reliably I submit this patch that changes > > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM is turned on. > > > > 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. > > I think it'll still suit Mikulas' debugging needs if we always use > vmalloc for sizes above PAGE_SIZE? Even if that was the case then this doesn't sounds like CONFIG_DEBUG_VM material. We do not want a completely different behavior when the config is enabled. If we really need some better fallback testing coverage then the fault injection, as suggested by Vlastimil, sounds much more reasonable to me -- Michal Hocko SUSE Labs