Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp789858ybh; Tue, 21 Jul 2020 08:01:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1pvVFazDo/UbW/LZ1BBcWA74Po747XaahzD1mVjs61eO6ak4Z1IjfoZySrKLIXdK4xSYh X-Received: by 2002:a50:fd07:: with SMTP id i7mr26186146eds.221.1595343705200; Tue, 21 Jul 2020 08:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595343705; cv=none; d=google.com; s=arc-20160816; b=oKv4P61t7qEDujQOwiCWajPZmDDgfdXdBBipRiQqTaLT/cxJOOcaPm8/BZh7paYrWW 439EKCmxrMPkL036krKmIXwXozjMPI8ZTKrPRHnu+dMgmHBZcUHisOmTmzegZ/Rc3uTe UnsSyYjbZ6A4nkRlhUT8JWHkEbIVmHc2Cz5vQGM/PUTWS7EiNrYQHztkTqq5V8ygGZFN SQ1a4G8FsbfkxB4lFyntSjDtzQHLeO+GcTJSDhv0Ctb4mxYxQXihBA2iAPMqHM50ExJ5 qb+XY022me3hSMXzwdf61pJ4EQWEWlux0oBy2hIFXdk8cS5ZCBwF77qC80n7rc5ATU9J lMgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PdRzWzU32y088w1nnN7LL05iSLcy8TzWf9MSc3wvOO0=; b=vWoNOTJJZuNnn7GDMywVWo3lF/Yozs13Y77246Ywc3sso/wNQpQwmmjCOB2A2eXcZx yx8YEa+vtllH5chmtmXkq4Iy1FgFdVlXoswbYJdKeDu8RKNEBFwStFg9Cm+82OTh7nDA cfsp0ZBHcF0bgJMo9xqcndHq/LniGEtwYdQMc4OJakitRb3pNAcuh9wEubbsj2xmCzOu /L4vUOaYY8bkIngjCHag16u3Y7XK7XbdbOZ7LOKJJ88G8qRiyRyESzoSPeebH49h3cbN bZf41NLAhXiGjjMx0umbo6XM3Tal00lGJmpyX73flMnVTLUfha3qzVpZ9O88KVvAgjXI XCLg== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si12478282eja.474.2020.07.21.08.01.19; Tue, 21 Jul 2020 08:01:45 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbgGUPA3 (ORCPT + 99 others); Tue, 21 Jul 2020 11:00:29 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35850 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbgGUPA2 (ORCPT ); Tue, 21 Jul 2020 11:00:28 -0400 Received: by mail-wr1-f66.google.com with SMTP id 88so11244995wrh.3 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=cqP9gcQGouKXuAA2A99gq39dqlcXkMUImJ/cd8JWwFGeFk+F8KJMktN8a93Bi+043h yXy7+UgZeB9DOO3mm9GOmemKBBVHWLtdlFG9bsnSP2qbF3zYRcUDXDtFWNNREqGU7oQE CQUufjwfNC0Awfl+fb39XStrI9a0EhW9VLN7m5lk2LqJkbygXe3obMooHhhTdQcQgpe+ 0VrMXl4Ss0eXkV8utPxDlmZfwrkmeHtDsAv8R8x3bHTzulBoRniXN6Ax/AzxXY+RRCDw alSdb3L1eHjnoRSzkeQ5WrHRaNr7GVnGdNQANpeil/LD1/u7cSiGQEZYFw3OGAIk/t19 HoYw== X-Gm-Message-State: AOAM530HJ0eIkBLRrDZajPnHHc2i6mOm0mQGX8HybJLxQ5Z9c7NEQ8rs 5ERKUWkZZgV7xTLmc5mOe0O4ETw9 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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