From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: "Aneesh Kumar K.V" To: "Kirill A. Shutemov" , Hugh Dickins , Andrea Arcangeli , Andrew Morton Cc: Dave Hansen , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Jerome Marchand , Yang Shi , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [PATCHv4 04/25] rmap: support file thp In-Reply-To: <1457737157-38573-5-git-send-email-kirill.shutemov@linux.intel.com> References: <1457737157-38573-1-git-send-email-kirill.shutemov@linux.intel.com> <1457737157-38573-5-git-send-email-kirill.shutemov@linux.intel.com> Date: Fri, 18 Mar 2016 15:10:06 +0530 Message-ID: <87d1qs9lah.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: "Kirill A. Shutemov" writes: > [ text/plain ] > Naive approach: on mapping/unmapping the page as compound we update > ->_mapcount on each 4k page. That's not efficient, but it's not obvious > how we can optimize this. We can look into optimization later. > > PG_double_map optimization doesn't work for file pages since lifecycle > of file pages is different comparing to anon pages: file page can be > mapped again at any time. > Can you explain this more ?. We added PG_double_map so that we can keep page_remove_rmap simpler. So if it isn't a compound page we still can do if (!atomic_add_negative(-1, &page->_mapcount)) I am trying to understand why we can't use that with file pages ? -aneesh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org