Received: by 10.192.165.148 with SMTP id m20csp475944imm; Wed, 9 May 2018 16:33:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqF8lVH1ye3Im5w5lnUntuQolEADEiyoSskFFoKeh+lMYbiSa78mSj8oQJSEWASTD+9cm7C X-Received: by 10.98.249.9 with SMTP id o9mr39823688pfh.256.1525908801640; Wed, 09 May 2018 16:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525908801; cv=none; d=google.com; s=arc-20160816; b=dhKcckXl2vYhsCdi4cOg2gFHVlyl0p9girkKRDDoYTRYGCtlEWj4Cg58el/iqW21N5 63wyBmaSdYQcI+fknyiC6s+NB3kToISIqJVx6Mb7iD/aSSlQCyrIX+lLRiVtCA+rcFR+ 6CA9VND/QQNiBoMISlcSO7cJuaBK2OBHLk/k4WwfNau3ZJw6Ig5ldO/4XKCYMZvuz/S4 yZNLrh7eQXymw3pdTgidOHgkEyjG2x+dhSkXikFnMTgXIS0/LhxrGyB3k69kk1i5opOR dwG1x/wAxiUJ1NqDVdgxZfi4XEiD6ulhzWdg1wFlfc6c0znKRtQlSeFmypcPGgQySMQd YCCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=LVG4l/zTRKJ19nYQqG1BhW01SWqQx7js6+tm3gHnMbs=; b=D+ApTat9/V0a01ZFbQWXvMo1OEnnsUsFnevH/PBJalvyagZpDixzW6EZ4YUPEwxluj vhLEtrqvBITUHT7/izzi52gLGgGWTGSF30HtfeRBJ71NCK6CR+fLUZSlT0S9ZvcYM6sd 2FG3el7vcmJmb6eL07N7L7qNewv2hIukUh38GPHstvA+LpZ/te5CBa+YWeigIn3MG+Z8 /yM3W3PQj+punuz+khCYLaDACGopH8RVzmpMVHA7CjLwL61FbRTH9ncP0t8I81xkY3NR iPOU+8761y8OiHLppx/1wdjAG/15F6zp4tSJEkimoTGTcYTf+K+ZTXYfjpSgBKyagtTa p4iA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8-v6si7698564pgr.343.2018.05.09.16.33.07; Wed, 09 May 2018 16:33:21 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965998AbeEIXbE (ORCPT + 99 others); Wed, 9 May 2018 19:31:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53526 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965408AbeEIXbD (ORCPT ); Wed, 9 May 2018 19:31:03 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5E993CF1; Wed, 9 May 2018 23:31:02 +0000 (UTC) Date: Wed, 9 May 2018 16:31:01 -0700 From: Andrew Morton To: Jia He Cc: Andrea Arcangeli , Minchan Kim , Claudio Imbrenda , Arvind Yadav , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org, jia.he@hxt-semitech.com, Hugh Dickins Subject: Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm Message-Id: <20180509163101.02f23de1842a822c61fc68ff@linux-foundation.org> In-Reply-To: <1525403506-6750-1-git-send-email-hejianet@gmail.com> References: <20180503124415.3f9d38aa@p-imbrenda.boeblingen.de.ibm.com> <1525403506-6750-1-git-send-email-hejianet@gmail.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 May 2018 11:11:46 +0800 Jia He wrote: > In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE > unaligned for rmap_item->address under memory pressure tests(start 20 guests > and run memhog in the host). > > ... > > In rmap_walk_ksm, the rmap_item->address might still have the STABLE_FLAG, > then the start and end in handle_hva_to_gpa might not be PAGE_SIZE aligned. > Thus it will cause exceptions in handle_hva_to_gpa on arm64. > > This patch fixes it by ignoring(not removing) the low bits of address when > doing rmap_walk_ksm. > > Signed-off-by: jia.he@hxt-semitech.com I assumed you wanted this patch to be committed as From:jia.he@hxt-semitech.com rather than From:hejianet@gmail.com, so I made that change. Please let me know if this was inappropriate. You can do this yourself by adding an explicit From: line to the very start of the patch's email text. Also, a storm of WARN_ONs is pretty poor behaviour. Is that the only misbehaviour which this bug causes? Do you think the fix should be backported into earlier kernels?