Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1335883pxb; Fri, 24 Sep 2021 02:08:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEq51kMjJYWTOY7PemdRL24xdlVNiO0VNbdsB7cwAHEAgozXGC/FrAixnwgkPC9CMbtpca X-Received: by 2002:a05:6402:411:: with SMTP id q17mr3787966edv.35.1632474504549; Fri, 24 Sep 2021 02:08:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632474504; cv=none; d=google.com; s=arc-20160816; b=Z0JEHtxBux7yYDOHhR58q9lKy+TGW4dHEFPl5V/6a4MvUVCaPxBKuLLTTja4m7J8eY 5oRNfpbIM0KuLjtb/g/QZLsP0GnlwGg5iA0ACcqPReVC9oFwOnX7XrgQo5N2vFzE7Y+d ISVC2r6QV2VnDTS8kV+af/nK2mHuVtYfC8pkeiNyLDLKJre3Ao1+r7XmtkmlZaOcWhlU xOl4ioF4IwVUT7GRwjPowB3/u0LFceHmdv46YfHzfxWDGOoWnR2xOQu+pmcHcOKcYe06 c8Yb1Ce3wrCcUkXr4OyDYyTzHn8ML91nDMCluOfjfAnHNo/9K771kd36Kdjug+CfdtYv bmQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6+5dT0e/LVnNHHcl0ABQyeUOLyC28rt8o7MtGQJ16Wk=; b=kKbnh1F9H0ivR6PyIV+I+hKYRBFAyaBVi+SR7hHMl4goY5PxhWSS5vm7W7YoK8MwKH 4NgVHIwG2yXZCjMdLMB7Q5FOFJIKEEGUCz6y66H/QERYrsXb0aaLLPY0T2qDvZDQhtta 1JRivGcTA3eafRnQHqqLEH56cExacd5rR1ayPsjdiBeJy13FqdbyEKdiAx4VwYrKvehv d7BK7YTeVpB/ioQpN5t80ErPI09usW6OuaKHvDyol7lpp9mpZfkcr1d6j08B/uLOcARE qejn7Qw3/5C8HRmRRyrMSpWJs2k+5KR8vtaS6GKdkanYRwnybzcYEgTEpj8tQmN15omx SRmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=KWiNL3UH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg20si7926830ejc.267.2021.09.24.02.08.00; Fri, 24 Sep 2021 02:08:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=KWiNL3UH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244498AbhIXH4r (ORCPT + 99 others); Fri, 24 Sep 2021 03:56:47 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:58268 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244495AbhIXH4o (ORCPT ); Fri, 24 Sep 2021 03:56:44 -0400 Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) by smtp-out1.suse.de (Postfix) with ESMTP id 41DDE22416; Fri, 24 Sep 2021 07:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1632470111; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6+5dT0e/LVnNHHcl0ABQyeUOLyC28rt8o7MtGQJ16Wk=; b=KWiNL3UHQbuoAkuBsiy3YSQftN/E2jhVDCGJVJ4SuDi14ga6EYTPLdskYk6XwXRICZFsXG bEWK+3mJ2tb2wipT9UFRw4dJv04b+FFJK7rjY3eOiFx60uVYVav5B3hKKV06bppDfRyf6C q8TEmpzdS0lmOTDDH+ryD1WOMtFlK0k= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay1.suse.de (Postfix) with ESMTPS id C507B25CCD; Fri, 24 Sep 2021 07:55:10 +0000 (UTC) Date: Fri, 24 Sep 2021 09:55:08 +0200 From: Michal Hocko To: Vasily Averin Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Tetsuo Handa , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org Subject: Re: [PATCH mm] vmalloc: back off when the current task is OOM-killed Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 23-09-21 09:49:57, Vasily Averin wrote: [...] > I'm agree that vmalloc callers should expect and handle single vnalloc failures. > I think it is acceptable to enable fatal_signal_pending check to quickly > detect such kind of iussues. > However fatal_signal_pending check can cause serial vmalloc failures > and I doubt it is acceptable. > > Rollback after failed vmalloc can call new vmalloc calls that will be failed too, > even properly handled such serial failures can cause troubles. Could you be more specific? Also how would this be any different from similar failures for an oom victim? Except that the later is less likely so (as already mentioend) any potential bugs would be just lurking there for a longer time. > Hypothetically, cancelled vmalloc called inside some filesystem's transaction > forces its rollback, that in own turn it can call own vmalloc. Do you have any specific example? > Any failures on this path can break the filesystem. > I doubt it is acceptable, especially for non-OOM fatal signals. > On the other hand I cannot say that it is a 100% bug. > > Another scenario: > as you know failed vmalloc calls pr_warn. According message should be sent > to remote terminal or netconsole. I'm not sure about execution context, > however if this is done in task context it may call vmalloc either in terminal > or in network subsystems. Even handled, such failures are not fatal, > but this behaviour is at least unexpected. I do not think we want to shape the vmalloc bahavior based on printk/console behavior. > Should we perhaps interrupt the first vmalloc only? This doesn't make much sense to me TBH. It doesn't address the very problem you are describing in the changelog. -- Michal Hocko SUSE Labs