From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756825AbcCCHrO (ORCPT ); Thu, 3 Mar 2016 02:47:14 -0500 Received: from mail-ob0-f180.google.com ([209.85.214.180]:33898 "EHLO mail-ob0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbcCCHrL (ORCPT ); Thu, 3 Mar 2016 02:47:11 -0500 MIME-Version: 1.0 In-Reply-To: <56D71860.7050108@suse.cz> References: <1456448282-897-1-git-send-email-iamjoonsoo.kim@lge.com> <56D71860.7050108@suse.cz> Date: Thu, 3 Mar 2016 16:47:10 +0900 Message-ID: Subject: Re: [PATCH v4 1/2] mm: introduce page reference manipulation functions From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , Michal Nazarewicz , Minchan Kim , Mel Gorman , "Kirill A. Shutemov" , Sergey Senozhatsky , Steven Rostedt , Linux Memory Management List , LKML , linux-api@vger.kernel.org, Joonsoo Kim Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-03-03 1:44 GMT+09:00 Vlastimil Babka : > On 02/26/2016 01:58 AM, js1304@gmail.com wrote: >> >> From: Joonsoo Kim >> >> Success of CMA allocation largely depends on success of migration >> and key factor of it is page reference count. Until now, page reference >> is manipulated by direct calling atomic functions so we cannot follow up >> who and where manipulate it. Then, it is hard to find actual reason >> of CMA allocation failure. CMA allocation should be guaranteed to succeed >> so finding offending place is really important. >> >> In this patch, call sites where page reference is manipulated are >> converted >> to introduced wrapper function. This is preparation step to add tracepoint >> to each page reference manipulation function. With this facility, we can >> easily find reason of CMA allocation failure. There is no functional >> change >> in this patch. >> >> In addition, this patch also converts reference read sites. It will help >> a second step that renames page._count to something else and prevents >> later >> attempt to direct access to it (Suggested by Andrew). >> >> Acked-by: Michal Nazarewicz >> Signed-off-by: Joonsoo Kim > > > Even without Patch 2/2 this is a nice improvement. > Acked-by: Vlastimil Babka > > Although somebody might be confused by page_ref_count() vs page_count(). Oh > well. Yes... it was pointed by Kirill before but consistency is not the purpose of this patchset so I skipped it. There are too many sites (roughly 100) so I'm not sure this code churn is worth doing now. If someone think it is really important, I will handle it after rc2. Thanks.