From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbeASKDK (ORCPT ); Fri, 19 Jan 2018 05:03:10 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37787 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbeASKDC (ORCPT ); Fri, 19 Jan 2018 05:03:02 -0500 X-Google-Smtp-Source: ACJfBovTOte4jqpJvqNK4vItIpP30eMzq9HFv8bUgxZwc/pmbdmfPupaiC3G2QvL5V44FQofXdUm/w== Date: Fri, 19 Jan 2018 13:02:59 +0300 From: "Kirill A. Shutemov" To: Michal Hocko Cc: Dave Hansen , Tetsuo Handa , torvalds@linux-foundation.org, kirill.shutemov@linux.intel.com, akpm@linux-foundation.org, hannes@cmpxchg.org, iamjoonsoo.kim@lge.com, mgorman@techsingularity.net, tony.luck@intel.com, vbabka@suse.cz, aarcange@redhat.com, hillf.zj@alibaba-inc.com, hughd@google.com, oleg@redhat.com, peterz@infradead.org, riel@redhat.com, srikar@linux.vnet.ibm.com, vdavydov.dev@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [mm 4.15-rc8] Random oopses under memory pressure. Message-ID: <20180119100259.rwq3evikkemtv7q5@node.shutemov.name> References: <201801160115.w0G1FOIG057203@www262.sakura.ne.jp> <201801170233.JDG21842.OFOJMQSHtOFFLV@I-love.SAKURA.ne.jp> <201801172008.CHH39543.FFtMHOOVSQJLFO@I-love.SAKURA.ne.jp> <201801181712.BFD13039.LtHOSVMFJQFOFO@I-love.SAKURA.ne.jp> <20180118122550.2lhsjx7hg5drcjo4@node.shutemov.name> <20180118154026.jzdgdhkcxiliaulp@node.shutemov.name> <20180118172213.GI6584@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118172213.GI6584@dhcp22.suse.cz> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 06:22:13PM +0100, Michal Hocko wrote: > On Thu 18-01-18 18:40:26, Kirill A. Shutemov wrote: > [...] > > + /* > > + * Make sure that pages are in the same section before doing pointer > > + * arithmetics. > > + */ > > + if (page_to_section(pvmw->page) != page_to_section(page)) > > + return false; > > OK, THPs shouldn't cross memory sections AFAIK. My brain is meltdown > these days so this might be a completely stupid question. But why don't > you simply compare pfns? This would be just simpler, no? In original code, we already had pvmw->page around and I thought it would be easier to get page for the pte intead of looking for pfn for both sides. We these changes it's no longer the case. Do you care enough to send a patch? :) -- Kirill A. Shutemov