From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 6AC756B0287 for ; Mon, 8 Jan 2018 03:37:47 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id q6so7201505pff.16 for ; Mon, 08 Jan 2018 00:37:47 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id q7si8319704plk.225.2018.01.08.00.37.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 08 Jan 2018 00:37:46 -0800 (PST) Date: Mon, 8 Jan 2018 09:37:42 +0100 From: Michal Hocko Subject: Re: [PATCH] mm: ratelimit end_swap_bio_write() error Message-ID: <20180108083742.GB5717@dhcp22.suse.cz> References: <20180106043407.25193-1-sergey.senozhatsky@gmail.com> <20180106094124.GB16576@dhcp22.suse.cz> <20180106100313.GA527@tigerII.localdomain> <20180106133417.GA23629@dhcp22.suse.cz> <20180108015818.GA533@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180108015818.GA533@jagdpanzerIV> Sender: owner-linux-mm@kvack.org List-ID: To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Andrew Morton , Tetsuo Handa , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Mon 08-01-18 10:58:18, Sergey Senozhatsky wrote: > On (01/06/18 14:34), Michal Hocko wrote: > > > zsmalloc allocation is just one possibility; an error in > > > compressing algorithm is another one, yet is rather unlikely. > > > most likely it's OOM which can cause problems. but in any case > > > it's sort of unclear what should be done. an error can be a > > > temporary one or a fatal one, just like in __swap_writepage() > > > case. so may be both write error printk()-s can be dropped. > > > > Then I would suggest starting with sorting out which of those errors are > > critical and which are not and report the error accordingly. I am sorry > > to be fuzzy here but I am not familiar with the code to be more > > specific. Anyway ratelimiting sounds more like a paper over than a real > > solution. Also it sounds quite scary that you can see so many failures > > to actually lock up the system just by printing a message... > > the lockup is not the main problem and I'm not really trying to > address it here. we simply can fill up the entire kernel logbuf > with the same "Write-error on swap-device" errors. Your changelog is rather modest on the information. Could you be more specific on how the problem actually happens, how likely it is? And again, I do not think the throttling is an appropriate counter measure. We do want to print those messages when a critical situation happens. If we have a fallback then simply do not print at all. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org