Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp422648imu; Tue, 27 Nov 2018 14:41:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/WsxhCmiuwL+owgVPwhtxgLYRlE5Pd7p5fxJbavOtIfDqEFdWHCKd9J/Z5bhf6Gu+9tGVYT X-Received: by 2002:a63:9e0a:: with SMTP id s10mr31116210pgd.239.1543358513104; Tue, 27 Nov 2018 14:41:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543358513; cv=none; d=google.com; s=arc-20160816; b=UqJOW122rxlF1MsVqUxBRn8tx7B/9vYbCQ46PdQ3jMAhS6TI9bTdASWvkJavqEEp+G DtKHmeWs1BLbXdD+LDt51N+O3KirYVzfji3TImH8OaIZCRufuuDvnxEqF7fXYQgnAVFr N7wNcLctIdfGiCL3ek1mfdEG6qpTL1B5UPSVyXnPeULX9RfNOR19Cm2/Q8uwDWvrZJj8 mnKB6Tdvhc9WSnISPTw/VajMCucXp8NJ6MoR/2XJNKIxjwW/w2o1qU0knkltjnD5zgO4 ZlDFdo8z1OVaRsmHCFt0+pkDdUPSEHUQPfYS79DFWyZYUYSxbAyyflTYtQ5Ww3RoibM8 +msg== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=epJEwGhIlOTf4E3hr/jnK2x328XOXS++LkLUZdPYtWg=; b=ETOBhnOqKbIKk4lK35267B2YWxuixBPvsvfOtPXfqxG6S+ix2jozhQmNH3++TxvEci aCBTEN8EN+i4d3hJmqwFhkwPZzftsziPjqiFWsf8tdeeSvH0m51YWSAeJQEpnYzVs9pR bw+8h2zcItSGHLVPMAqLMndc/Yyx1PsXF51NoEVtJXU5gTJYSjtDw5vtCnmqY2XRnfCd orfYB7jCw70WOYxe0bsR5X3VqSpSWOCIXd+z9dDgQ2yl2SUOhIHaC/alYRnpBEu02UGo 9dCi5gXuuCyWiUOxXhNiA+mIfWACj/nLnjRKtzY+vggIzRFzSYtrtKxBbjIgDG5ps7Ec hz/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yj8PA+cO; 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 h88si5740307pfa.49.2018.11.27.14.41.37; Tue, 27 Nov 2018 14:41:53 -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=@gmail.com header.s=20161025 header.b=Yj8PA+cO; 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 S1726989AbeK1JkZ (ORCPT + 99 others); Wed, 28 Nov 2018 04:40:25 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46939 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbeK1JkY (ORCPT ); Wed, 28 Nov 2018 04:40:24 -0500 Received: by mail-pl1-f193.google.com with SMTP id t13so16318126ply.13 for ; Tue, 27 Nov 2018 14:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=epJEwGhIlOTf4E3hr/jnK2x328XOXS++LkLUZdPYtWg=; b=Yj8PA+cOZCLAXaTPkx1RVIg97vZ38v7Ewjq8CTSZs6RISt+sK4z7jcj4pn8/UeDQYj 7A88Hwbfy84Gx0lwYqNIQ9gcKeHSdMIWv4VJ748lZMrmW0yB4kzTsSwUJOmG000XGCA9 oYpBRGEXTGbF4tSugIxilcHszBxbpbfgh2kN6JyRTAYmQ6tf7JjlOGUR0EYPqXRrPkDh CQym2b7pC+UaneJd/AMbssx2bBWvHC01OTvho9Spw3/EiHpMXmWfr2lTaEuSleyGBZS2 mLDQvijz8q+I+hlAx+FV3jSXY1cgMiSD45HL8gpNMIdQEjywI/5bhvf0bLPKNxusOYWu 8duQ== 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=epJEwGhIlOTf4E3hr/jnK2x328XOXS++LkLUZdPYtWg=; b=gc18OomkiznKvmOH7TKzQKR+OXRmbwQXhuq0P54ay923XUQOWzfeF6xhoHb3ol4f9b TqgnacpUWsidpP2mzjHNXusK0IkhK/AyEZ2YEQTBPaG5QRQ1ljg4+G02qBkQTS9H5Dn8 v4FT5IolTpk+7+FbbufWwQjWBWi4aT4r8gkCt9lfwiCczYVV77N3XtjM2qjVvUfau/E0 fzXBtVlU6+7PNfnfc1vshOM6IKNJTiibhvm3C5q/i5ZiXVz60aL7cQWkl+CKD1Tak/O4 crDO1f/efQuR0Tg6341nA6IODabIK9nLt0uWYCYFzkaa87HBej2iRFUioWMFD0I8m+h5 K5Sg== X-Gm-Message-State: AA+aEWbPbFCfad7MolPhVttN6b1ZqCHIvTXmBkOkFChC39nyC3GALWG7 ij8Gy0FZSR+PF2Y5xJH7+3A= X-Received: by 2002:a17:902:6e16:: with SMTP id u22mr33840728plk.175.1543358460304; Tue, 27 Nov 2018 14:41:00 -0800 (PST) Received: from gmail.com (cpe-98-150-136-16.hawaii.res.rr.com. [98.150.136.16]) by smtp.gmail.com with ESMTPSA id x127sm6667685pfd.156.2018.11.27.14.40.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 14:40:59 -0800 (PST) Date: Tue, 27 Nov 2018 12:40:52 -1000 From: Joey Pabalinas To: Hugh Dickins Cc: Mike Rapoport , Matthew Wilcox , Linus Torvalds , Andrew Morton , Baoquan He , Michal Hocko , Vlastimil Babka , Andrea Arcangeli , David Hildenbrand , Mel Gorman , David Herrmann , Tim Chen , Kan Liang , Andi Kleen , Davidlohr Bueso , Peter Zijlstra , Christoph Lameter , Nick Piggin , pifang@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joey Pabalinas Subject: Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated Message-ID: <20181127224052.2zyxkdo4lbecq4cz@gmail.com> Mail-Followup-To: Joey Pabalinas , Hugh Dickins , Mike Rapoport , Matthew Wilcox , Linus Torvalds , Andrew Morton , Baoquan He , Michal Hocko , Vlastimil Babka , Andrea Arcangeli , David Hildenbrand , Mel Gorman , David Herrmann , Tim Chen , Kan Liang , Andi Kleen , Davidlohr Bueso , Peter Zijlstra , Christoph Lameter , Nick Piggin , pifang@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20181127105848.GD16502@rapoport-lnx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rjiqytyomg5yqcqz" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rjiqytyomg5yqcqz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 27, 2018 at 01:08:50PM -0800, Hugh Dickins wrote: > On Tue, 27 Nov 2018, Mike Rapoport wrote: > > On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: > > >=20 > > > +/* > > > + * A choice of three behaviors for wait_on_page_bit_common(): > > > + */ > > > +enum behavior { > > > + EXCLUSIVE, /* Hold ref to page and take the bit when woken, like > > > + * __lock_page() waiting on then setting PG_locked. > > > + */ > > > + SHARED, /* Hold ref to page and check the bit when woken, like > > > + * wait_on_page_writeback() waiting on PG_writeback. > > > + */ > > > + DROP, /* Drop ref to page before wait, no check when woken, > > > + * like put_and_wait_on_page_locked() on PG_locked. > > > + */ > > > +}; > >=20 > > Can we please make it: > >=20 > > /** > > * enum behavior - a choice of three behaviors for wait_on_page_bit_com= mon() > > */ > > enum behavior { > > /** > > * @EXCLUSIVE: Hold ref to page and take the bit when woken, > > * like __lock_page() waiting on then setting %PG_locked. > > */ > > EXCLUSIVE, > > /** > > * @SHARED: Hold ref to page and check the bit when woken, > > * like wait_on_page_writeback() waiting on %PG_writeback. > > */ > > SHARED, > > /** > > * @DROP: Drop ref to page before wait, no check when woken, > > * like put_and_wait_on_page_locked() on %PG_locked. > > */ > > DROP, > > }; >=20 > I'm with Matthew, I'd prefer not: the first looks a more readable, > less cluttered comment to me than the second: this is just an arg > to an internal helper in mm/filemap.c, itself not kernel-doc'ed. >=20 > But the comment is not there for me: if consensus is that the > second is preferable, then sure, we can change it over. For something which is internal to a single file I strongly prefer the first as well. --=20 Cheers, Joey Pabalinas --rjiqytyomg5yqcqz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEENpTlWU2hUK/KMvHp2rGdfm9DtVIFAlv9x/MACgkQ2rGdfm9D tVKdGRAAut8v4nSlw2U4Hn42UtEqzpblfw3CUOpTTRO8TArXhZyq7cCQW9+rmfXf 83gLqcfVwIt+jg9VqpORM6hFtotkwRtwBOM0ZO5KkcHKpgI1+z9UVTWI1ZYSwm67 0CF/TyeRdNm3VP8WF1RG0CffG1ujTEZMF2sG0krVwKhBVNARD3hZSaI5jWBtxyJ0 VnCiGrkzChqwoQDtRQaIb2DXNRd1w4GX2K+A3SJi7ALUvyPsk1+rrrsss+fHaEkB pZIy/5NNnOKvO3vxtxOSs2xWKVF5weBdjOCtr9UbZOY7BMpoZxAGCRSXxngk4K6a croT4+68OKW4OXmyHL2HXlHPuj9dRvHQXUXtBpYRPHdwz3QC9LK62nOo8FTjO6BK mwuoAu5pnkdZZJKLB4jIfiyPssBl6+gyYfkS5WVpNTtHXB4jdvSbyg4GGUdBUiuB zhv8SHNSsNpDL0SORZPkOpc6OYnvZVIa+tFyop7YWCeLh3GdMcKdKSxsynaizk3c w4cXc7E8vawHWEiEDOTp0/cbAh0ZJeU0H7WyJssdHsNEjL90dppsMxGrOTJs+U2+ zjtB9te3QakLh48Y2nppuYy+9WH75Xs72lNHo+dN3wmuAQwUH74p+FPHSynh1yoE sj8tpBBYrkDcOlDlFuL+37U2Noo39zzfXMCoZeoMcEy01DC92iQ= =9Eyk -----END PGP SIGNATURE----- --rjiqytyomg5yqcqz--