From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D60C433E3 for ; Tue, 21 Jul 2020 15:01:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23A8F20729 for ; Tue, 21 Jul 2020 15:01:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23A8F20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B53C6B0002; Tue, 21 Jul 2020 11:01:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 865296B0003; Tue, 21 Jul 2020 11:01:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A1B86B0005; Tue, 21 Jul 2020 11:01:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 645D96B0002 for ; Tue, 21 Jul 2020 11:01:23 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C420F181B048E for ; Tue, 21 Jul 2020 15:01:22 +0000 (UTC) X-FDA: 77062396404.23.noise58_150a15826f2e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 82AD397948 for ; Tue, 21 Jul 2020 15:00:28 +0000 (UTC) X-HE-Tag: noise58_150a15826f2e X-Filterd-Recvd-Size: 4288 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Jul 2020 15:00:27 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id o11so21527779wrv.9 for ; Tue, 21 Jul 2020 08:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PdRzWzU32y088w1nnN7LL05iSLcy8TzWf9MSc3wvOO0=; b=Slj047uUJDPEp0ggWVdRCTCyWoDytpUjPoZZiZ4rKppduYyiMSj+jDxse0axFmccZg 70SmUgSI6TQyCYnS160cvGgsXHdJg+ikRWl9AzI1SIgQGfM9e8polWdvFB2AaV6E6Wr7 DZlVyFcpIEFMyB+KRtrTl/YMHQ7NTUqBJNPKysPfuNxyuq93rPTALQKUv5EjAkxfWP+Z Jl1hJLyLG772zchTgOIlKM45KnsLFsFTzmbMbNUWq578GPhZ7k/kAkU9zJr0fLWFehwm 0C7MsoBNQanB3/YJMMLMmonXaIzwtIT885IyaqEC5Ga1PrOPbrsbVw0MDciSEqP7I7k3 aObg== X-Gm-Message-State: AOAM531hTuB+awG4HPgxipubk5qXzNzYCB7ro56ZDCDpzA5JruR6gDiX 2qV7YcdMGqfmckuADxNMM10= X-Google-Smtp-Source: ABdhPJxco7vYnqIFP97qOvGVNKuHycTz/zqbqi5v7NCur7WZ6wi/ZNqRv2m84qNgnC2PyV+EndhDqw== X-Received: by 2002:adf:ff8a:: with SMTP id j10mr12839448wrr.323.1595343626779; Tue, 21 Jul 2020 08:00:26 -0700 (PDT) Received: from localhost (ip-37-188-169-187.eurotel.cz. [37.188.169.187]) by smtp.gmail.com with ESMTPSA id b139sm4002776wmd.19.2020.07.21.08.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 08:00:25 -0700 (PDT) Date: Tue, 21 Jul 2020 17:00:24 +0200 From: Michal Hocko To: Chris Down Cc: linux-mm@kvack.org, LKML , Andrew Morton , Linus Torvalds , Tim Chen Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page Message-ID: <20200721150024.GM4061@dhcp22.suse.cz> References: <20200721063258.17140-1-mhocko@kernel.org> <20200721141749.GA742741@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721141749.GA742741@chrisdown.name> X-Rspamd-Queue-Id: 82AD397948 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 21-07-20 15:17:49, Chris Down wrote: > I understand the pragmatic considerations here, but I'm quite concerned > about the maintainability and long-term ability to reason about a patch like > this. For example, how do we know when this patch is safe to remove? Also, > what other precedent does this set for us covering for poor userspace > behaviour? > > Speaking as a systemd maintainer, if udev could be doing something better on > these machines, we'd be more than receptive to help fix it. In general I am > against explicit watchdog tweaking here because a.) there's potential to > mask other problems, and b.) it seems like the kind of one-off trivia nobody > is going to remember exists when doing complex debugging in future. > > Is there anything preventing this being remedied in udev, instead of the > kernel? Yes, I believe that there is a configuration to cap the maximum number of workers. This is not my area but my understanding is that the maximum is tuned based on available memory and/or cpus. We have been hit byt this quite heavily on SLES. Maybe newer version of systemd have a better tuning. But, it seems that udev is just a messenger here. There is nothing really fundamentally udev specific in the underlying problem unless I miss something. It is quite possible that this could be triggered by other userspace which happens to fire many workers at the same time and condending on a shared page. Not that I like this workaround in the first place but it seems that the existing code allows very long wait chains and !PREEMPT kernels simply do not have any scheduling point for a long time potentially. I believe we should focus on that even if the systemd as the current trigger can be tuned better. I do not insist on this patch, hence RFC, but I am simply not seeing a much better, yet not convoluted, solution. -- Michal Hocko SUSE Labs