Received: by 10.192.165.148 with SMTP id m20csp33363imm; Thu, 26 Apr 2018 15:24:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx48uDLDMWKjNVUVDlNtWcihjx2tL4jADvrSm4guweiLSRvb31XdnPSlP/3Rv+IClpdTgRzhl X-Received: by 2002:a17:902:42a5:: with SMTP id h34-v6mr35505807pld.65.1524781467209; Thu, 26 Apr 2018 15:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524781467; cv=none; d=google.com; s=arc-20160816; b=k3xeszqtKNzCgTL5gAt/KZU8x3Bq5JxqOzn/CMSSi98Jl7Q+PlIA1dWQjXcGR6fsRT TkjyFem2Tw6vqa4nQmhYeDjFErx/rhaYLHqiXT4XKBybX3JNm/MLbieh+0Go7vNUTLus 5WITJlVnlxSmfMZdL7a8rrtt/L2F4V0kRBfjZmCXvsDoEtX/WRNXWialTIm9xuOmWObM kG6AEcdwDFR2oYFtxJfU8q5/7Uh+9gd1SDTuz06dQFm9Ql9hyO3kMYhTdp4sIOwsVjjA lzd29x7rxhDg63xDHW4nziBD9PEQDgHSgZ9qeT7c216LiURlurEfP/sSHz1wJ5KSwras PJXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=WVeEklkQ7tCq6V/pUFuH7ySHRmndJXB0MClFiKjYxNI=; b=yUN82MKyXzbbc1IRDERbfqaOBTkf3UiKbgdictQ79Faccn6UEBRWfCxfQHqJdyLsYt 11GqgVSvSNhyHcIjKTQRxHRWYJTZZw1/FY/hWTnpxf+hiXkFdflIoH53nIY7YSg/jmpp Splr7dOZ2tnrFyTrE8DBIIC1qmUosh4lal90W8nTeX1yil3tDAwItqPwnWxiP/0VJ17H he1lsv5UNzZPCm9wUkHeZiUw9Cj+9fkeAxgZU5kXgEZYthOJgPAJPuN7Cs4CF8Jzj+n3 zg+U473889h8yN12csDI3E4I2Hi/7fS2F86CIyo7KEuA+U47trA1OuQTkKIdCyZDRSsL lUwQ== 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 u128si11982968pgc.247.2018.04.26.15.23.48; Thu, 26 Apr 2018 15:24:27 -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 S1756930AbeDZWV5 (ORCPT + 99 others); Thu, 26 Apr 2018 18:21:57 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45738 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754684AbeDZWVz (ORCPT ); Thu, 26 Apr 2018 18:21:55 -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 09D69406C743; Thu, 26 Apr 2018 22:21:55 +0000 (UTC) Received: from redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with SMTP id 9A3092166BC6; Thu, 26 Apr 2018 22:21:52 +0000 (UTC) Date: Fri, 27 Apr 2018 01:21:52 +0300 From: "Michael S. Tsirkin" To: Mikulas Patocka Cc: John Stoffel , James Bottomley , Michal@stoffel.org, eric.dumazet@gmail.com, netdev@vger.kernel.org, jasowang@redhat.com, Randy Dunlap , linux-kernel@vger.kernel.org, Matthew Wilcox , Hocko , linux-mm@kvack.org, dm-devel@redhat.com, Vlastimil Babka , Andrew@stoffel.org, David Rientjes , Morton , virtualization@lists.linux-foundation.org, David Miller , edumazet@google.com Subject: Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options Message-ID: <20180427005213-mutt-send-email-mst@kernel.org> References: <1114eda5-9b1f-4db8-2090-556b4a37c532@infradead.org> <1524694663.4100.21.camel@HansenPartnership.com> <1524697697.4100.23.camel@HansenPartnership.com> <23266.8532.619051.784274@quad.stoffel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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]); Thu, 26 Apr 2018 22:21:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Apr 2018 22:21:55 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 26, 2018 at 05:50:20PM -0400, Mikulas Patocka wrote: > How is the user or developer supposed to learn about this option, if > he gets no crash at all? Look in /sys/kernel/debug/fail* ? That actually lets you filter by module, process etc. I think this patch conflates two things: 1. Make kvmalloc use the vmalloc path. This seems a bit narrow. What is special about kvmalloc? IMHO nothing - it's yet another user of __GFP_NORETRY or __GFP_RETRY_MAYFAIL. As any such user, it either recovers correctly or not. So IMHO it's just a case of making __GFP_NORETRY, __GFP_RETRY_MAYFAIL, or both fail once in a while. Seems like a better extension to me than focusing on vmalloc. I think you will find more bugs this way. 2. Ability to control this from a separate config option. It's still not that clear to me why is this such a hard requirement. If a distro wants to force specific boot time options, why isn't CONFIG_CMDLINE sufficient? But assuming it's important to control this kind of fault injection to be controlled from a dedicated menuconfig option, why not the rest of faults? IMHO if you split 1/2 up, and generalize, the path upstream will be much smoother. Hope this helps. -- MST