From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756973AbeDZWV6 (ORCPT ); Thu, 26 Apr 2018 18:21:58 -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 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: Sender: linux-kernel-owner@vger.kernel.org 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