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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E744C6FD18 for ; Tue, 18 Apr 2023 19:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbjDRTdq (ORCPT ); Tue, 18 Apr 2023 15:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232226AbjDRTdl (ORCPT ); Tue, 18 Apr 2023 15:33:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3BCC7A94 for ; Tue, 18 Apr 2023 12:33:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3CC3660F77 for ; Tue, 18 Apr 2023 19:33:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F298C433EF; Tue, 18 Apr 2023 19:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681846419; bh=X+5emsm5/XcM0QeOriAGVbzKqML6KnpuYnqauTGrAr8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PVCaji7MVpWuFJdo47N9kdRSDsKscdneyyrEGnaFAcoEtPlG/TQvDttw4zVBPcm1H AtENa8f86w1D1W26qU9Tqd7UXzDCbL1Sn6PJ5AjLx8ahCE6+FG6NyJSjq2Cwu8EknG u5JOA/Az/AO8ixvecHnhIObLUgthorFGPFqpgYmg= Date: Tue, 18 Apr 2023 12:33:38 -0700 From: Andrew Morton To: Matthew Wilcox Cc: "zhaoyang.huang" , Minchan Kim , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhaoyang Huang , ke.wang@unisoc.com Subject: Re: [PATCH] mm: fix printk format within cma Message-Id: <20230418123338.3b85a013cf6ce1fcb3677ae2@linux-foundation.org> In-Reply-To: References: <1681788789-19679-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Apr 2023 04:38:24 +0100 Matthew Wilcox wrote: > On Tue, Apr 18, 2023 at 11:33:09AM +0800, zhaoyang.huang wrote: > > cma and page pointer printed via %p are hash value which make debug to be hard. > > change them to %px. > > Why does printing the page pointer make any sense at all? Surely the > PFN makes much more sense. I suppose one could correlate a particular hashed pointer with other debug output, see "ah, that's the same page". In which case one doesn't really care whether or not the address is hashed - it's just a cookie. This sounds thin. I doubt if a lot of thought went into the printk. If the page pointer isn't useful then how about we simply remove it from the message?