From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75DDFC433EF for ; Tue, 16 Nov 2021 03:40:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 18A7761546 for ; Tue, 16 Nov 2021 03:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 18A7761546 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8FA3C6B00A8; Mon, 15 Nov 2021 22:40:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 882866B00B4; Mon, 15 Nov 2021 22:40:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7229E6B00B5; Mon, 15 Nov 2021 22:40:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 5ED096B00A8 for ; Mon, 15 Nov 2021 22:40:13 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1F51118194D4C for ; Tue, 16 Nov 2021 03:40:13 +0000 (UTC) X-FDA: 78813390306.03.5383342 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf11.hostedemail.com (Postfix) with ESMTP id 3D844F000212 for ; Tue, 16 Nov 2021 03:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wo8VLPIL3XDPuzQpcTdx1vDacN7QA0ljgdGz16YetOs=; b=NLp5nQSLYVi65k9F1H5vkQUJ5w 3ULmt7jgA7W6+d88h0MUxCgnRgpU21vWMG7MGKuUoNuLCnu82lflEBZYH/CwsvFa17XlVGfXRjT1v eh0/pZIQiuAY7jXeY1l97smCS9bSzBNjHTl+RSeF6XQ9L7Eh+uvnMhkVIrSC6bkvi1c269XgaD1CI 1xS/IOFZuTD7FHzWf4LPhnqBhEDjR95248EPBTa17PGknhhqtXesQrMJ1AygaSOZzdLw1mMM51RF+ VJGHZcbUnjjXHUus/AM5xy7xdmqNax5OpH7Day2mTe58Ra69v7ucVf8BpwAaIXx8sqhBz8IhupQlt hhoIYDQw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmpKH-006RYE-Ot; Tue, 16 Nov 2021 03:40:05 +0000 Date: Tue, 16 Nov 2021 03:40:05 +0000 From: Matthew Wilcox To: Harish Mara Cc: linux-mm@kvack.org, Aniket Kulkarni , Pawan Powar , Rajshekar Iyer , ask@linux.vnet.ibm.com Subject: Re: Question regarding map count for compound pages Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3D844F000212 X-Stat-Signature: r6daa35mmez9ercaq4u61j6zqnuwwu64 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=NLp5nQSL; spf=none (imf11.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1637034007-926084 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 15, 2021 at 10:47:01PM -0400, Harish Mara wrote: > Background: > On older kernel?s, we could have our device driver create char devices and Which device driver is this? > It looks like the culprit is zap_pte_range(), which calls > page_remove_rmap() with the compound_flag = false. As a result, instead of > decrementing the compound_mapcount for the page the page->_mapcount is > decremented causing a lot of bad page errors. There is a lot of confusion in the core MM between 'compound page' and 'PMD allocation'. I'm trying to fix it; do you have time to help?