Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1045702imm; Wed, 10 Oct 2018 08:19:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV60qAWWPoOg1MZ+IBVetBPlynDD58uJ3dtWX7jcQHO8X1NaE39MbkHQH1DX69OQY6WPQdfLG X-Received: by 2002:a17:902:a50e:: with SMTP id s14-v6mr33472249plq.78.1539184790511; Wed, 10 Oct 2018 08:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539184790; cv=none; d=google.com; s=arc-20160816; b=tCLXQICELIiq9r/TOiiOpNFUF5oSAJr7SFQEsnJIQG1amauTvf7wGM5E3W/BhFTpbz rWy0LJTSon+UyhlMb68zXF6cNot76YNpdXN86PugoXbBr9YqfwBMUBcnzkQi0YCyKXHo 6+ZmAwKF34epEjMPbzLRhQ7TaPypVNrO6bNT05b20H9KZ72JlnTypze8nluXcVn/2eJy iXsxb3M+VQlcB0H6UtfFMEZUgnV/5ULum8oC0XMtaNCil+e981li7goOYZzKhZPAPmCl HF+/aavl+jp/A/RiBCmxmEu3U+VPTJflry5xrIWjuwb6yXeiSLZjOJrCH/VhIJ4SZ7rW rqng== 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:date:from:dkim-signature; bh=cRO6xWryp9VZ+Z/m1BE0LEBrMcJd0c81mmESyZBjTac=; b=q9zZlklavQTKwLduzciBE9yYuAAoWBup5nqWzF5QrYEqlzuywiGIsyloY5nvP59s/L Wt1GxVaAL9PY2NyN3Qcu3hRprM4WmLrj+JylxYp/3ZwquYObNRhZ3V3G6zHi6OjJfEXe AhowPc/qD7qNmnFLBEIv2+Q4E1PEyeNVz3GjHdwm8tpNOCUQHrtgoKljNidNC9Q05gQJ la87lRWDFolDv1KHAyZ4cC5SAaE7X7B2CzuLaeX2LF25V+dJzba47yWtNejm/+bS57AN tSGNUqAGX4ASoQ6ivRIpftSM7dbimOv/dHaps1GUfKb3TsfiRqiMitJGC22H+Fgto2sf H9dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XwjXAHtb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i23-v6si23463011pgl.230.2018.10.10.08.19.35; Wed, 10 Oct 2018 08:19:50 -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=pass header.i=@gmail.com header.s=20161025 header.b=XwjXAHtb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbeJJWkV (ORCPT + 99 others); Wed, 10 Oct 2018 18:40:21 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41730 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbeJJWkU (ORCPT ); Wed, 10 Oct 2018 18:40:20 -0400 Received: by mail-pg1-f195.google.com with SMTP id 23-v6so2667600pgc.8 for ; Wed, 10 Oct 2018 08:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cRO6xWryp9VZ+Z/m1BE0LEBrMcJd0c81mmESyZBjTac=; b=XwjXAHtb0076NrYxue1X96i0pusQL6JnkAJlh5lYIGh1VZtESL0yhZI+fP5lOJ6h/x 8rXVXBc4IH7hc/P9Iae0un9x+SQn8K5kdwgTKc4iTMzP0ZISM48JjZvmJoP9Kk6nvxrh vDPpC1G4OqAJ4lLc8c8tzmRuw1LbF28WqNNIXFFLhDnPK0i+ilqe3o+csqKcZyyICqxw 6KqpVDO/xQ5GAxyv9C9/1bXJofA1DAiDWnihC4lPHVPQ4hw67bciSmi0mOFmRPxWK3jF Oli9O4uG+JwZ6qW1vwaG4omh08g+gvjbnbg8c8EDyIAWHruTkTTblTO6p4veYB77eTE5 yq2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cRO6xWryp9VZ+Z/m1BE0LEBrMcJd0c81mmESyZBjTac=; b=AIN0IODpYwARbI6b0+n02WZH+XJrsyJ5IYRlKOQRuPJgF40JHVl6IdC7iipKta6Wg+ 5q2dTlhXCxzowFV0jjnKtayIo9RxfZN4Qo3DzNoai5y17qF7AnKTE5LFmvj0sObFzZg1 glV2sVIqEGfuDzvb4bwmUoHuQB0xMQNZK+0+upk6B59gqQFIlCGocSC7Tv5+TbpotLIA sDR7f3rB3oMMYQKLnzKYTk+EE05rorSrFibZnl/MrcSRmxdJlEsT012vK2uZBcQYecAr RWu/u2Owza7yEYfmrUURY6P9Dg3KvRmbj7IKRKYd24+UvY50wdeymJCxNuUJaZQhIBgB Rg8Q== X-Gm-Message-State: ABuFfoiEw5eW2xFuT/PiFvcG3EmtL0QN0eu1285/YiQgJ2KyF7wWeg+X TtisqJ7LkZ+Mz/LA+j2Flnc= X-Received: by 2002:a63:4e11:: with SMTP id c17-v6mr29686244pgb.6.1539184661626; Wed, 10 Oct 2018 08:17:41 -0700 (PDT) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id d18-v6sm48642136pfk.163.2018.10.10.08.17.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 08:17:40 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Thu, 11 Oct 2018 00:17:29 +0900 To: Dmitry Vyukov , Michal Hocko Cc: Sergey Senozhatsky , Tetsuo Handa , syzbot , Johannes Weiner , Andrew Morton , guro@fb.com, "Kirill A. Shutemov" , LKML , Linux-MM , David Rientjes , syzkaller-bugs , Yang Shi , Sergey Senozhatsky , Petr Mladek Subject: Re: INFO: rcu detected stall in shmem_fault Message-ID: <20181010151729.GC3949@tigerII.localdomain> References: <000000000000dc48d40577d4a587@google.com> <201810100012.w9A0Cjtn047782@www262.sakura.ne.jp> <20181010085945.GC5873@dhcp22.suse.cz> <20181010113500.GH5873@dhcp22.suse.cz> <20181010114833.GB3949@tigerII.localdomain> <20181010122539.GI5873@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (10/10/18 14:29), Dmitry Vyukov wrote: > >> A bit unrelated, but while we are at it: > >> > >> I like it when we rate-limit printk-s that lookup the system. > >> But it seems that default rate-limit values are not always good enough, > >> DEFAULT_RATELIMIT_INTERVAL / DEFAULT_RATELIMIT_BURST can still be too > >> verbose. For instance, when we have a very slow IPMI emulated serial > >> console -- e.g. baud rate at 57600. DEFAULT_RATELIMIT_INTERVAL and > >> DEFAULT_RATELIMIT_BURST can add new OOM headers and backtraces faster > >> than we evict them. > >> > >> Does it sound reasonable enough to use larger than default rate-limits > >> for printk-s in OOM print-outs? OOM reports tend to be somewhat large > >> and the reported numbers are not always *very* unique. > >> > >> What do you think? > > > > I do not really care about the current inerval/burst values. This change > > should be done seprately and ideally with some numbers. > > I think Sergey meant that this place may need to use > larger-than-default values because it prints lots of output per > instance (whereas the default limit is more tuned for cases that print > just 1 line). > > I've found at least 1 place that uses DEFAULT_RATELIMIT_INTERVAL*10: > https://elixir.bootlin.com/linux/latest/source/fs/btrfs/extent-tree.c#L8365 > Probably we need something similar here. Yes, Dmitry, that's what I meant - to use something like DEFAULT_RATELIMIT_INTERVAL * 10 in OOM. I didn't mean to change the default values system wide. --- We are not rate-limiting a single annoying printk() in OOM, but functions that do a whole bunch of printks - OOM header, backtraces, etc. Thus OOM report can be, I don't know, 50 or 70 or 100 lines (who knows). So that's why rate-limit in OOM is more permissive in terms of number of printed lines. When we rate-limit a single printk() we let 10 prinks() /*10 lines*/ max every 5 seconds. While in OOM this transforms into 10 dump_header() + 10 oom_kill_process() every 5 seconds. Still can be too many printk()-s, enough to lockup the system. -ss