Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp59614imu; Tue, 27 Nov 2018 09:01:42 -0800 (PST) X-Google-Smtp-Source: AJdET5dkYHmQPXyRtGFram8cxD6wW4u+EqiGkcCUH4AzjcycjpOl32XNnFRPEBwLPpUbaqz0Kr1i X-Received: by 2002:a62:f909:: with SMTP id o9-v6mr33095079pfh.244.1543338101976; Tue, 27 Nov 2018 09:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543338101; cv=none; d=google.com; s=arc-20160816; b=ZWKo+GVtjkfczkDq6kx6X60whsCn+0kPPZMKm1FweoQJr5NcDoknJEa9D1xPqpP3YE fP38TGFY0BUEePo9vtfAcp8Xli1T3naHGZOg2bBz/QrFm/ZvgJHaJIPCMdLweuZmcS/r aM8ef8cYPIXufKn3YErDq9PrHO66q5QqfRfPhTxnlWaBIrDp8FTVpnq+1A0Pg2o5UFjY jWlKMEo4mJYP4zj0TfBZRqOQFbjelDdz7Egrn6uyRkOHj/vHHtO0ANJcID2lt1Ba6Tq6 1sw0pQvA7U0kEIXFiBjHvLDNveL6UHPQXZb18uqL9uvgoYC7uzVGlBAesBoraM7IDWCV 9/Rw== 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=irQrZ6DfxW1N1L8CqFqg5rqEpddiPsOVqPg9YJGZ3bE=; b=Epq3ugtSElakX9LBb2ILAaVNZ8W0tXh2xPEULGGny6srU7FA2q1z0VMbcpi7JzeVMc J4h0CZR7v6B54NP9/zZn9F/alwWjP+HmBoUm4EPilrQdr2LkQSBffKuPz7me/H5OYMx+ gYz+Y0+ohsO/tKL9AxuuTrW8an+JpLFqYqkTRJdFJ6kT1fDB93TwhQyp4Nj4oiB05Wb5 rkneEV7l9r99MmvD4mGpMMzz9OxnymKCtmFso/TKWMbOBUXEBjGfkH0SvmnUOt3OBVb7 WHAb45cscHge0GOpeaIPIkaruDxhcM5gmQqDC1mK0HDfw/2L5zP9sjP6jhWzRFkPsiCX UqCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=NMG1WpT7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q24si4082815pgi.334.2018.11.27.09.00.56; Tue, 27 Nov 2018 09:01:41 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=NMG1WpT7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731599AbeK1D5X (ORCPT + 99 others); Tue, 27 Nov 2018 22:57:23 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39470 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729826AbeK1D5X (ORCPT ); Tue, 27 Nov 2018 22:57:23 -0500 Received: by mail-lf1-f66.google.com with SMTP id n18so16998052lfh.6 for ; Tue, 27 Nov 2018 08:58:50 -0800 (PST) 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=irQrZ6DfxW1N1L8CqFqg5rqEpddiPsOVqPg9YJGZ3bE=; b=NMG1WpT74QkG56LLr6Vf38yjYRJeT1mWAnXXlj75iW48bcB68MLjr/IM0gSw7zoWXO zs+lwEaX1V5xC85xGvByMZSobI9Quz9IQ4SdOS6kVZnChm3F/pT+xDsA9JSGDcz9U88h 9N+wOAS0zxnD4n78R9uZimN3i9ePrvBeh6ZE0= 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=irQrZ6DfxW1N1L8CqFqg5rqEpddiPsOVqPg9YJGZ3bE=; b=EnsuqnxTGco1leHRQAAJHieOsMxqRCeq1Z5mOVy+OisDfOx7YtZjfbB0DS8zqJcy3j fhyUYqPKIAphmO/48eux2aEB6yuvJCjfmyeUrb0bbm+Xj4ALQGmAAkXZEmd3UnPmUSOg Iv7A6vt7nCY9Gw0KuyXPtRq1U8BAVUyyl1TUlfvQwhOWOIAMBpPV07QW8Rq9yeekn95K ugej2VYF9G08OQmed1CQV4vwWbQTMUhDn8+ZJ77vI326RQ2+HV5LWKoL6ZI0FlxJfpHg sVCXAVmI9zQmYOALXlB+hVhWH9OGeCnAj+YgjmSlKInO6D0ln7DzTd7c84M0PX8T/VeW 7AZQ== X-Gm-Message-State: AGRZ1gLDHTV7m6HK8cK5Sm9xsAc5+qzikKhihQ7iLc6il5SdiyY8PZi3 hRSDh3wRU3aKHVrrt/s6Q/hST4SLbtU= X-Received: by 2002:a19:94d5:: with SMTP id o82mr18064527lfk.155.1543337929273; Tue, 27 Nov 2018 08:58:49 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id c20sm674681lfj.67.2018.11.27.08.58.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 08:58:48 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id p17so17008962lfh.4 for ; Tue, 27 Nov 2018 08:58:47 -0800 (PST) X-Received: by 2002:a19:7013:: with SMTP id h19mr20755156lfc.147.1543337927283; Tue, 27 Nov 2018 08:58:47 -0800 (PST) MIME-Version: 1.0 References: <20181126205351.GM3065@bombadil.infradead.org> <20181127105602.GC16502@rapoport-lnx> <010001675613a406-89de05df-ccf6-4bfa-ae3b-6f94148d514a-000000@email.amazonses.com> In-Reply-To: <010001675613a406-89de05df-ccf6-4bfa-ae3b-6f94148d514a-000000@email.amazonses.com> From: Linus Torvalds Date: Tue, 27 Nov 2018 08:58:30 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated To: Christoph Lameter Cc: rppt@linux.ibm.com, Matthew Wilcox , Hugh Dickins , Andrew Morton , bhe@redhat.com, Michal Hocko , Vlastimil Babka , Andrea Arcangeli , david@redhat.com, mgorman@techsingularity.net, David Herrmann , Tim Chen , kan.liang@intel.com, Andi Kleen , Davidlohr Bueso , Peter Zijlstra , Nick Piggin , pifang@redhat.com, Linux List Kernel Mailing , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 27, 2018 at 8:49 AM Christopher Lameter wrote: > > A process has no refcount on a page struct and is waiting for it to become > unlocked? Why? Should it not simply ignore that page and continue? The problem isn't that you can just "continue". You need to *retry*. And you can't just busy-loop. You want to wait until the page state has changed, and _then_ retry. Linus