From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753714AbcAMDsk (ORCPT ); Tue, 12 Jan 2016 22:48:40 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:12034 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbcAMDsi (ORCPT ); Tue, 12 Jan 2016 22:48:38 -0500 Subject: Re: [PATCH] bugfix dax fault page should be no cache To: Matthew Wilcox References: <1452599025-25489-1-git-send-email-chenjie6@huawei.com> <20160112125131.GB8945@linux.intel.com> CC: Alexander Viro , , , , , From: "Chenjie (K)" Message-ID: <5695C8C0.1080005@huawei.com> Date: Wed, 13 Jan 2016 11:47:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160112125131.GB8945@linux.intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.57.123.83] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.5695C8CC.0090,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a8591641738bb3fdcd9f63ac612e926f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DAX means Direct Access for files,if the pages have cache, the file is not direct access. But in normal condition, we can not find the problem directly. In our case, we use ext2 filesystem with dax on the reserved mem. we mmap the file and write some things ,the file is not changed immediately. this is the wrong place to change that attribute: Do you mean add ext4_file_mmap/ext2_file_mmap if (IS_DAX(file_inode(file))) { vma->vm_ops = &ext4_dax_vm_ops; vma->vm_flags |= VM_MIXEDMAP; + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); } else { like this ??? On 2016/1/12 20:51, Matthew Wilcox wrote: > On Tue, Jan 12, 2016 at 07:43:45PM +0800, chenjie6@huawei.com wrote: >> From: chenjie >> >> We show the pte: >> *pte=01600000159c8fd3 >> The page should be no_cache attr,it will be better. > > I disagree. What data do you have to show that the WC attribute would > be better than WB? > > Even if we agree to that, this is the wrong place to change that > attribute, so the patch is NAKed. But you need more than "it will > be better". > > . >