From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3105CC43381 for ; Sat, 2 Mar 2019 15:22:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED72E20838 for ; Sat, 2 Mar 2019 15:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbfCBPWw (ORCPT ); Sat, 2 Mar 2019 10:22:52 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726044AbfCBPWw (ORCPT ); Sat, 2 Mar 2019 10:22:52 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x22FDvq5117877 for ; Sat, 2 Mar 2019 10:22:50 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qymbs9ft1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 02 Mar 2019 10:22:50 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 2 Mar 2019 15:22:48 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) 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) Sat, 2 Mar 2019 15:22:46 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x22FMjFi58785988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 2 Mar 2019 15:22:45 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B7EC42041; Sat, 2 Mar 2019 15:22:45 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 782784203F; Sat, 2 Mar 2019 15:22:44 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.72.181]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sat, 2 Mar 2019 15:22:44 +0000 (GMT) From: Chandan Rajendra To: Jan Kara Cc: "Aneesh Kumar K.V" , mpe@ellerman.id.au, Dan Williams , linux-fsdevel@vger.kernel.org Subject: Re: write fault on dax mapping and usage of set_pte_at. Date: Sat, 02 Mar 2019 20:53:28 +0530 Organization: IBM In-Reply-To: <20190301144959.GA14863@quack2.suse.cz> References: <871s41a9mo.fsf@linux.ibm.com> <87sgwh86rk.fsf@linux.ibm.com> <20190301144959.GA14863@quack2.suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-GCONF: 00 x-cbid: 19030215-0008-0000-0000-000002C6E508 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19030215-0009-0000-0000-000022333D26 Message-Id: <5880366.jAGquUDMt5@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-02_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=883 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903020113 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Friday, March 1, 2019 8:19:59 PM IST Jan Kara wrote: > On Thu 21-02-19 21:37:27, Aneesh Kumar K.V wrote: > > Jan Kara writes: > > > > > On Thu 21-02-19 19:11:14, Aneesh Kumar K.V wrote: > > >> On 2/21/19 5:42 PM, Jan Kara wrote: > > >> > Hi Aneesh, > > >> > > > >> > On Thu 21-02-19 12:52:39, Aneesh Kumar K.V wrote: > > > > > >> Do pfn_mkwrite callback need to insert the pfn details for a RO->RW fault > > >> type? Can't we skip that pfn insert and let finish_mkwrite_fault handle that > > >> pte update? > > > > > > Yes, pfn_mkwrite() must fully update the PTE as the PTE update must happen > > > under a lock that is private to DAX code. Using ptep_set_access_flags() > > > in iomap code isn't going to be simple either. I have to think whether / > > > how that is possible. > > > > Can we use ptep_clear_flush followed by set_pte_at()? > > So in the end the thing was simpler than I thought. Does attached patch fix > the warnings for you? > > Honza > Hi Jan, Yes, the patch attached by you does indeed fix the warnings. -- chandan