Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1903300imm; Thu, 24 May 2018 02:38:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo+37xzrqxgfuCPqJDD4Sm7PN1GlbhpjEN6kTAR61CbMVskkGemDDszjxRJxxipT3U6ggm0 X-Received: by 2002:a63:934d:: with SMTP id w13-v6mr5372129pgm.212.1527154738781; Thu, 24 May 2018 02:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527154738; cv=none; d=google.com; s=arc-20160816; b=AHoHgEOLY9tsr87zWF82jSPzMBQyW6xWRYnkUuekrz1oZfwOsCzSyLwCcP4Cv59ZL4 nnzcihCjCYwaevAyK2PlzXxkHS9+RktXkxE/VD7oO1tdhnO30LknvUKGhE9gKCSCxxus KuPNmf1OB+yyN2egoXvqizQztr+0KHFFSpaKSoKcGW8OiZR6YsdenBA5pLyUP29ApjWg +Ofkkw56K7I1ToOTGQGjrr9OSrrGYvgseg9kOmQnyB3qvMUi9M6cIdYW/w+ByuPGrIsm jfu6kk9qSHbnYZJsY7Wu8qHpIfpAXifSaT5CcnWLzUN7mzWO4nE0IvBrx4Qgq4ZtyO1c nP0g== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=b3oGpAwbH9WbqJ/bTG8WZ3LhzitpdyAz9eCbYrdTeCE=; b=m3CNUVnR3TnsnzQPQ2sP5XowzMFQ6H+d58nhcZ/VzKHHKxdX15OgqWIVaOhsomjbu9 SWDYOLNpSs4go0XBAVYfEVWlIjWlwahUj59REqWnAkUEZCZ/BwyEURASRruSiZIUyrTd 6DhEUAkVE0LpDlk+QPQhvfa5S9X8fmBNfoMnBx4d1ywAz52YzzBxQXJsAgDtoWRciE2M b2s9xwjcXrBd+MUo0h2MCsE1Gy5ciSxv8BBd9b0e+g3v0e31677uwFUjmStUSWLs8mxm Mw94Dnb3pV7g3B+vbFnxToCB+dc3NFODy1CHEb+iU9Z7gCA06xlsdtFk/+CoOuxPxcvE pqaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pza6eNJc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29-v6si16413046pgc.504.2018.05.24.02.38.44; Thu, 24 May 2018 02:38:58 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pza6eNJc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966045AbeEXJhL (ORCPT + 99 others); Thu, 24 May 2018 05:37:11 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:41585 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965783AbeEXJhH (ORCPT ); Thu, 24 May 2018 05:37:07 -0400 Received: by mail-pg0-f67.google.com with SMTP id d14-v6so529775pgv.8 for ; Thu, 24 May 2018 02:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=b3oGpAwbH9WbqJ/bTG8WZ3LhzitpdyAz9eCbYrdTeCE=; b=pza6eNJcl1IM2fQOuYq+gf51fVZWmw1U/eBMpAeQnZXVjr0stUxFeEAT3Cdv1fPw2e IRE3u1CyOsMc8n1IR5/BwB287qeiduenpa9eJr2MHuh4LXyhW/4mF6mR3UYUDluqWpGC icS8YRuHQVBTBOCSd3+wqokYM9auRfxZFM/QkKTBsez6pEhBzjEtmvUF/QbbVZPRs6v3 bVXDu7Ymb5h6VvZI3yOqj2HIPfI9M4RRosfDYNUNfM8vEz0ZB3klqA2vKoBmuTkcrniN /lGyVYaozww1TOrYWMvuWIGKehQlLuxkKXt2/LmuyWViUSPCLVyR4On3X69dBHwjH4hN WJ9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b3oGpAwbH9WbqJ/bTG8WZ3LhzitpdyAz9eCbYrdTeCE=; b=VSsVXd7bO69Cor3PMnxkLT9F19MHF5jyDWczmRxQmobRBd0hUiy3X5cGb/3PBTHLP9 brebbShkFixXi+jGJQVA8MGFUZM1LESH92xgI6V4rmeTa8bNQ43CvOHW66vwS4Or6mk1 FgVv1Add6d7k7qfibMtPPidd2X/ySGdKP1xlDg2CrDN8FHnY/vo4RIlnxjDWWrg2TRED eM2wT9/ly8i0PWEWatrOFkQ9BJXLCm+obzMvWoxTdDwa8lQ/O0Ds3QtiBtrbYR1arDfB 40g9SIf4jiKrABpqglvUIiGn+9lQDogjkd9lNPYP3g/mQ3LM1q8brVoXhRna7hGq0KGE qKZg== X-Gm-Message-State: ALKqPwcRkk0omUNuazBwABWU1fFhn8UHmjnNERdJf++I3rwHxAQePWWE 2ON+oubSq7V/9Vt4MMVVAM4= X-Received: by 2002:a63:a344:: with SMTP id v4-v6mr2059823pgn.442.1527154627377; Thu, 24 May 2018 02:37:07 -0700 (PDT) Received: from [0.0.0.0] (67.216.217.169.16clouds.com. [67.216.217.169]) by smtp.gmail.com with ESMTPSA id p3-v6sm8584763pgu.40.2018.05.24.02.36.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 02:37:06 -0700 (PDT) Subject: Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm To: Suzuki K Poulose , Andrew Morton 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 References: <20180503124415.3f9d38aa@p-imbrenda.boeblingen.de.ibm.com> <1525403506-6750-1-git-send-email-hejianet@gmail.com> <20180509163101.02f23de1842a822c61fc68ff@linux-foundation.org> <2cd6b39b-1496-bbd5-9e31-5e3dcb31feda@arm.com> <6c417ab1-a808-72ea-9618-3d76ec203684@arm.com> <198fe48c-0d26-7dd1-89dc-415bd3c7ab41@gmail.com> <575857e6-c8ec-efa0-6434-b78a513aeaba@arm.com> From: Jia He Message-ID: <2c220e3d-8ff1-f9a9-9038-fff38952b8b1@gmail.com> Date: Thu, 24 May 2018 17:36:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <575857e6-c8ec-efa0-6434-b78a513aeaba@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/2018 5:01 PM, Suzuki K Poulose Wrote: > On 24/05/18 09:50, Jia He wrote: >> Hi Suzuki >> >> On 5/24/2018 4:44 PM, Suzuki K Poulose Wrote: >>> On 14/05/18 10:45, Suzuki K Poulose wrote: >>>> On 10/05/18 00:31, Andrew Morton wrote: >>>>> 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? >>>>> >>> >>> >>> Jia, Andrew, >>> >>> What is the status of this patch ? >>> >>> Suzuki >> I thought the patch is merged into mmotm tree. >> http://www.ozlabs.org/~akpm/mmotm/series >> But I don't know what is the next step. > > Hi Jia, > > Thanks for the update. I think that should eventually hit mainline. When it does, > please could you send the patch to stable kernel versions too ? > > Usually having a "Cc: stable@kernel.vger.org" in the original patch (for > critical fixes) would have done the trick. But since we don't have it, > please send it following the stable kernel rules. > > Cheers > Suzuki > Ok,thanks for pointing -- Cheers, Jia