Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1566574ybh; Thu, 23 Jul 2020 12:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa28rr2OPV+jmunGdvQVzNx3tJRT6H5+Lol4gDq5Glez78mULt7wPNwK48tVsCNzaku9g4 X-Received: by 2002:a17:906:38d6:: with SMTP id r22mr5666754ejd.219.1595531197075; Thu, 23 Jul 2020 12:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595531197; cv=none; d=google.com; s=arc-20160816; b=Z7r4srsrmIq/ySTy9or6kY6zCi8rOHzsNMyeHyRI38uP4xkmk/w2vxLBTB0cjPOnBR vw7fMaPyFoyro6j0Y0m7Xd3HT4YJ4wbLwUygBjKWg6Df+JiTL9uxvK1AgroqAa1mNahm cnD0GFS5JcT5T5ljwaA5WDVNwnCozgVqM8Pwauk2LwZfKuSlJT0qYsQ6jyOP06gc7KDs L7gZspNO0yXVVjXRo6kCWskFlmbEwXQr38NZVAODck8lKIJCZ6sRFwy8upzL6babL6vV hLFDbo2EQC3GYSWQ/TxOTcKDq6/oIQ2Q8A8j3xY1gofab32nj4Eq/BaSdIw+PF6NkfDC ztGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fJhkw4LjVZC2fyF4ODxc6PhVc1AqEdr3YS0LDTexCFA=; b=DY7zCar/+NPjEk5+i0+lKgDvS0DOmEx8KuGujQ9EmGgmFjP8F/sUD+ldJ7mSQcxs8R jaGm4IYGK6g5/GCktsd6mD+yipWJoIpAfASwI6iPL4uuzGTZb6BtsIGyxS3IY+mrhXw1 PV8uehiafld8NzVJ2/TqO7iIPT42Nu9MFOOwkJi7vEIGrkF/kH6q3cIZcLeNWi4qymNy ifPuT5TLmzQvgqER72qypDMrjHGmJ4qdSz2GLJ4BaVZXuwcMjhlI+ENzV6LRRkkhXsTl YnFllxmOrn1o3i8OZmeYOGtMQ1+05UCNQO4G2JhfTFp4NERUBpyNsg7M7v0Z4CinG42k 7YDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Seq9CxBf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si2553467ejc.7.2020.07.23.12.06.13; Thu, 23 Jul 2020 12:06:37 -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=@linux-foundation.org header.s=google header.b=Seq9CxBf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbgGWTD0 (ORCPT + 99 others); Thu, 23 Jul 2020 15:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbgGWTD0 (ORCPT ); Thu, 23 Jul 2020 15:03:26 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CE40C0619DC for ; Thu, 23 Jul 2020 12:03:24 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id j11so7498294ljo.7 for ; Thu, 23 Jul 2020 12:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fJhkw4LjVZC2fyF4ODxc6PhVc1AqEdr3YS0LDTexCFA=; b=Seq9CxBfDQO7Rx1dVy7lFNVwlCIJxvuPh/aneAJa0JWE3qkG9y3x7j0f7VuJIkQbe1 sFXRqqEUciBv73M58wAONE5hvM8NzHxANSpxsw6CC0Q0sj0HhHVAhZ40gxJak5lu22EX /wTgTpiUDuDoZLp7OcgEH56jueRbtXtXG2p44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fJhkw4LjVZC2fyF4ODxc6PhVc1AqEdr3YS0LDTexCFA=; b=PsHVD+o8G1UHwsTLHXIEfLK8YF5FEo4KI9Cpz962mBRBINfCscy7+wS6i8KXIFW6bw hebO5CUektbQWP70YpQL+MPl8DcBQ6qLe0ZEpui703eqQzJ2GGX6oC3HZZ7Xd8E5f+vG yFxBvDnakKY1gTFBcRUuLbHsOBoVHekvn5AvnbzC9qpIhyaTZs2fyOBR9zhrIlqLUAWA wPIMGe0qvoNC0/TROSi9z/OB8efP7EWSEg9pO6FRjTqB4LPbwElqsjKBpPlgI5U9YXXr l3PlDPH2HDXIZkplacg2g8TPwCYjG3EAsPZS2ZicVHGCL1HEf7NNTL57e1BzxGLkdZXp 0/BQ== X-Gm-Message-State: AOAM5336iToz8fdF28XOC4vYBvu9/Qt3uy2RlpDAgJbTjBfb4oKy3TaP 2y1D8Q2SIOgjI0RLKSk8vXH/meA8k74= X-Received: by 2002:a2e:9a82:: with SMTP id p2mr2622410lji.129.1595531002782; Thu, 23 Jul 2020 12:03:22 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id j66sm3285388lfd.74.2020.07.23.12.03.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2020 12:03:21 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id l19so1093086lfh.1 for ; Thu, 23 Jul 2020 12:03:20 -0700 (PDT) X-Received: by 2002:a05:6512:241:: with SMTP id b1mr2969280lfo.125.1595531000293; Thu, 23 Jul 2020 12:03:20 -0700 (PDT) MIME-Version: 1.0 References: <20200721063258.17140-1-mhocko@kernel.org> <20200723124749.GA7428@redhat.com> <20200723180100.GA21755@redhat.com> In-Reply-To: From: Linus Torvalds Date: Thu, 23 Jul 2020 12:03:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] mm: silence soft lockups from unlock_page To: Oleg Nesterov Cc: Hugh Dickins , Michal Hocko , Linux-MM , LKML , Andrew Morton , Tim Chen , Michal Hocko Content-Type: multipart/mixed; boundary="000000000000805f8005ab208298" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000805f8005ab208298 Content-Type: text/plain; charset="UTF-8" On Thu, Jul 23, 2020 at 11:22 AM Linus Torvalds wrote: > > So I think that is a separate issue, generic to our finish_wait() uses. IOW, I think we should do something like this (this is on top of my patch, since it has that wake_page_function() change in it, but notice how we have the exact same issue in our traditional autoremove_wake_function() usage). Comments? Linus --000000000000805f8005ab208298 Content-Type: application/octet-stream; name=patch Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kcz5y2bf0 IGluY2x1ZGUvbGludXgvbGlzdC5oIHwgMjAgKysrKysrKysrKysrKysrKysrKy0KIGtlcm5lbC9z Y2hlZC93YWl0LmMgIHwgIDIgKy0KIG1tL2ZpbGVtYXAuYyAgICAgICAgIHwgIDcgKy0tLS0tLQog MyBmaWxlcyBjaGFuZ2VkLCAyMSBpbnNlcnRpb25zKCspLCA4IGRlbGV0aW9ucygtKQoKZGlmZiAt LWdpdCBhL2luY2x1ZGUvbGludXgvbGlzdC5oIGIvaW5jbHVkZS9saW51eC9saXN0LmgKaW5kZXgg YWZmNDRkMzRmNGU0Li4wZDBkMTdhMTBkMjUgMTAwNjQ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