From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbcD0Quh (ORCPT ); Wed, 27 Apr 2016 12:50:37 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35550 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbcD0Qug (ORCPT ); Wed, 27 Apr 2016 12:50:36 -0400 Subject: Re: [BUG] set_pte_at: racy dirty state clearing warning To: Catalin Marinas References: <57180A53.3000207@linaro.org> <20160421084946.GA23774@e104818-lin.cambridge.arm.com> Cc: Will Deacon , linux-mm@kvack.org, LKML , "linux-arm-kernel@lists.infradead.org" From: "Shi, Yang" Message-ID: <50501020-db93-cb6c-c2d9-b59efc05c30d@linaro.org> Date: Wed, 27 Apr 2016 09:50:33 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160421084946.GA23774@e104818-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/21/2016 1:49 AM, Catalin Marinas wrote: > On Wed, Apr 20, 2016 at 04:01:39PM -0700, Shi, Yang wrote: >> When I enable memory comact via >> >> # echo 1 > /proc/sys/vm/compact_memory >> >> I got the below WARNING: >> >> set_pte_at: racy dirty state clearing: 0x0068000099371bd3 -> >> 0x0068000099371fd3 >> ------------[ cut here ]------------ >> WARNING: CPU: 5 PID: 294 at ./arch/arm64/include/asm/pgtable.h:227 >> ptep_set_access_flags+0x138/0x1b8 >> Modules linked in: > > Do you have this patch applied: > > http://article.gmane.org/gmane.linux.ports.arm.kernel/492239 > > It's also queued into -next as commit 66dbd6e61a52. No, but I just applied it, it works. Thanks, Yang > >> My kernel has ARM64_HW_AFDBM enabled, but LS2085 is not ARMv8.1. >> >> The code shows it just check if ARM64_HW_AFDBM is enabled or not, but >> doesn't check if the CPU really has such capability. >> >> So, it might be better to have the capability checked runtime? > > The warnings are there to spot any incorrect uses of the pte accessors > even before you run on AF/DBM-capable hardware. >