Received: by 10.192.165.148 with SMTP id m20csp279441imm; Fri, 20 Apr 2018 06:43:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/fua+kFEpjmFkSK/UQSsuA1X6EGwGKHRXw051tJ1CZpclKGbcqWIiauZfTiwWbFp3/kZOP X-Received: by 10.99.42.137 with SMTP id q131mr8549077pgq.379.1524231787774; Fri, 20 Apr 2018 06:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524231787; cv=none; d=google.com; s=arc-20160816; b=Ef0cSR8ssRQMuW19LGX7HLMQCjzEwJE/NpTbD+RI1Fa27ctMIo/vo2H9a/UrA0L5WS 1/qQqUGPHkZSZujHCXkm9l8EXEVmpj56F3SpVBNx6bAFq8mUUbeONNOGkv87BwsoNoIY sGc3dSCYWv3ujkXmNfGhdCRaEZnjej2Lh9YEzGRX7mDlSLKmOwoduVzqN4fEttB2nDpm knBz96WfqbjIZOK2k01LPmy+dUv4X5Nzzh4LAGZZZMJ83iBP3NtDz/voTkrPWclQFnUW 0ExCDAMTnN5j6JEuQgVrz5B0u/RD0Zpu8Lx9PkFeuI6ncQp8NICnhZ3wJJu/IAdyvoqC EFNQ== 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:dkim-signature:arc-authentication-results; bh=9k5+VADSOwsdeXJmCDTUiOb8v3Aokk12yb750soJxe0=; b=cRyRw49vmdnYhxOX1nsVy7SB13oin1gDvZYbUBTs4C3i0R8CSGGM3Q/sza5JTyBAQI 8Qf/Edhr9pgECs0DCXGmRVjs7JHx+6J0GxyWvzbmcKWFdssnqoRyhWgroQ0Rc45bovYR wp7a1hQ2gZnzsXkRB7Ub/69nFGhEmI26eYH6nJqibPe/GmLa19u+2VkwLiIe9YSPB7eZ J/kVSbbNQiW/Jht6cg1oNo8eTUYe+PqTUYqP7dvPgDDZdYomP1WtfBc5x3OGHWAVif6c qzzaAYCT+EbBwBXicZnfoycQwdfydxM6wo6Ay8vGhw9ywkhlSc0uLRAIoth7D6s4KkJI uoGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Z4X3A+Yt; 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 j8si4710216pgp.506.2018.04.20.06.42.53; Fri, 20 Apr 2018 06:43:07 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Z4X3A+Yt; 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 S1755080AbeDTNlt (ORCPT + 99 others); Fri, 20 Apr 2018 09:41:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54002 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754838AbeDTNlr (ORCPT ); Fri, 20 Apr 2018 09:41:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9k5+VADSOwsdeXJmCDTUiOb8v3Aokk12yb750soJxe0=; b=Z4X3A+YtYPvz+6QsT+czQrjEx 3996qz/zodyn/bPX8kwsQB/LEcl8Ax2ELQL79fwoGgHIf2NApggDJTemT0EKl5mI5WOigZR3d3crv 00NKpR0fvMIuwmQTzarAi5Ylb1xduTWakhmiMAqWSL033zArrhnklyUsoPfg/rghTCLETT5MImG/X o44gXdKvA4PIApGNqXXvWQFLWZctVOwU9knPk4nWSmA7Fcud5u11STNRe5SRKBinvIo695xdW5Y/m 17wjEQxDPFj9pdEMOmwMeRCnfLU92SbpCf/+ErxXVAU7WkUScnddvAeAMDiLl+jh4Bgza3hw62mG+ OLP2/KSgQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9WIC-0004AH-Rw; Fri, 20 Apr 2018 13:41:36 +0000 Date: Fri, 20 Apr 2018 06:41:36 -0700 From: Matthew Wilcox To: Michal Hocko 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: <20180420134136.GD10788@bombadil.infradead.org> References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> <20180418.134651.2225112489265654270.davem@davemloft.net> <20180420130852.GC16083@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180420130852.GC16083@dhcp22.suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?