Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp372534imu; Tue, 27 Nov 2018 13:48:03 -0800 (PST) X-Google-Smtp-Source: AJdET5eBGcgF835Fwnrnm8dnjhLrKNhucsNWkrUSZakvlT0fFaLOoFR8lz2lDcbxNrqKAYl7n1tw X-Received: by 2002:a62:83ce:: with SMTP id h197mr34528442pfe.187.1543355283545; Tue, 27 Nov 2018 13:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543355283; cv=none; d=google.com; s=arc-20160816; b=wBvw3tELZSLET1ZVLBa7EGh8eUsCJZt4gc0oNT+f7Z4w9E8jvVfOV0LDMnIOB5/ajf 20ZXWfrgOwbh3ZL20ckgcTllGeswNiBmM3QRNxR8YvlEd9pnb5Y5XKiIkbUD3WHcZRPM Y+s1KVdL4MfC7q7oDIPdKkqtG4sFzbqS4DCU8qpaKWU3POSQ8MsIZzyZhM6Sq83R8C1P cB0LrRPNWii/6nKqUXRj9cT+o/vFl7nI2qHFJ6kJfzFBUgD8VJMBGJ8Lv1JBouUQBUaG j/OcmmbghMU1SE7dZw939auxJ0xMIPt/5GMesDzK4Ccgel4agWNDk4sMkwcMCvnsLUBg RsXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=2AWki3WIUC4GMTE+DHOoOn6tu3oglaIzPqQaZPk66ks=; b=XK2LwKlTyCm2Hb3rXuA23vOYMyzC3kH+TjyZfBb/vr2T+Sbw/mTyZt1WOObgeLM1DN FqsgTq5bYYWLcdBW+qC4ieQLyFSMJwhhBIXeEKlCEeKHUejai6UFpNFdhx+8kop9ztoo Om2xt8UAurledYJ2hGTcl7yaDJnrW5pg0BvfP+vrFIq1HixpdVfWSTwGW98zuwCtgz+I bvvyFXAQ/DLZfh9qOZyb1K8WSCMEg/BVnAIK7GhRk1OLeBlbxQ+f3nX1M6YaHUuzGTKu 2YJkBKyB+g0OQsRpL1xBfjzhDzfQW5X1ZPzm0KWFq6kkOh9W3p9chyjFwgNzUj+3mBbr HqXQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si4943259pgs.126.2018.11.27.13.47.40; Tue, 27 Nov 2018 13:48:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726847AbeK1IpJ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Nov 2018 03:45:09 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35900 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726286AbeK1IpJ (ORCPT ); Wed, 28 Nov 2018 03:45:09 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wARLjJVP030135 for ; Tue, 27 Nov 2018 16:45:52 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p1cgrkujx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 27 Nov 2018 16:45:51 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Nov 2018 21:45:49 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 27 Nov 2018 21:45:44 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wARLjhwB61210818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 27 Nov 2018 21:45:43 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0918EA4065; Tue, 27 Nov 2018 21:45:43 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5B4AA4054; Tue, 27 Nov 2018 21:45:42 +0000 (GMT) Received: from [9.148.204.175] (unknown [9.148.204.175]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 27 Nov 2018 21:45:42 +0000 (GMT) Date: Tue, 27 Nov 2018 23:45:40 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: <20181127105848.GD16502@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated To: Hugh Dickins CC: 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 From: Mike Rapoport X-TM-AS-GCONF: 00 x-cbid: 18112721-0008-0000-0000-000002997382 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112721-0009-0000-0000-00002203B8E6 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-27_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=675 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811270183 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On November 27, 2018 11:08:50 PM GMT+02:00, Hugh Dickins wrote: >On Tue, 27 Nov 2018, Mike Rapoport wrote: >> On Mon, Nov 26, 2018 at 11:27:07AM -0800, Hugh Dickins wrote: >> > >> > +/* >> > + * 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. >> > + */ >> > +}; >> >> Can we please make it: >> >> /** >> * enum behavior - 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. >> */ >> 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, >> }; > >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. Hmm, indeed, making this kernel-doc would be premature. I was thinking about including this in a future description of the filemap internals, but until that would get written lot of things may change. >But the comment is not there for me: if consensus is that the >second is preferable, then sure, we can change it over. > >Hugh -- Sincerely yours, Mike.