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,URIBL_BLOCKED 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 2EE95C43381 for ; Thu, 21 Feb 2019 16:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 064CB2084D for ; Thu, 21 Feb 2019 16:07:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbfBUQHq (ORCPT ); Thu, 21 Feb 2019 11:07:46 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51360 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbfBUQHp (ORCPT ); Thu, 21 Feb 2019 11:07:45 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1LG4SJS013869 for ; Thu, 21 Feb 2019 11:07:45 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qsx5tuymn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Feb 2019 11:07:44 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Feb 2019 16:07:42 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 21 Feb 2019 16:07:40 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1LG7dri27263148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Feb 2019 16:07:39 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E37514C063; Thu, 21 Feb 2019 16:07:38 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A4814C040; Thu, 21 Feb 2019 16:07:33 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.199.55.4]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 21 Feb 2019 16:07:32 +0000 (GMT) X-Mailer: emacs 26.1 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Jan Kara Cc: Jan Kara , Chandan Rajendra , mpe@ellerman.id.au, Dan Williams , linux-fsdevel@vger.kernel.org Subject: Re: write fault on dax mapping and usage of set_pte_at. In-Reply-To: <20190221151513.GB23071@quack2.suse.cz> References: <871s41a9mo.fsf@linux.ibm.com> <20190221121238.GB21533@quack2.suse.cz> <20190221151513.GB23071@quack2.suse.cz> Date: Thu, 21 Feb 2019 21:37:27 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 19022116-0020-0000-0000-00000319991D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022116-0021-0000-0000-0000216AEBEB Message-Id: <87sgwh86rk.fsf@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-21_09:,, 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=737 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902210116 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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()? -aneesh