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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EAD9FC6194 for ; Fri, 8 Nov 2019 08:47:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1802E214DB for ; Fri, 8 Nov 2019 08:47:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1802E214DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C12A76B0007; Fri, 8 Nov 2019 03:47:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC2B26B0008; Fri, 8 Nov 2019 03:47:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFF9F6B000A; Fri, 8 Nov 2019 03:47:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 99A2E6B0007 for ; Fri, 8 Nov 2019 03:47:11 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 506EB180AD80F for ; Fri, 8 Nov 2019 08:47:11 +0000 (UTC) X-FDA: 76132480662.01.rain71_78ea957dfff63 X-HE-Tag: rain71_78ea957dfff63 X-Filterd-Recvd-Size: 3686 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 08:47:10 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7F52B209; Fri, 8 Nov 2019 08:47:08 +0000 (UTC) Date: Fri, 8 Nov 2019 09:47:07 +0100 From: Petr Mladek To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, Ioannis Ilkos , minchan@google.com, primiano@google.com, fmayer@google.com, hjd@google.com, joaodias@google.com, lalitm@google.com, rslawik@google.com, sspatil@google.com, timmurray@google.com, Andrew Morton , Andy Shevchenko , Changbin Du , Ingo Molnar , Joe Perches , Kees Cook , linux-mm@kvack.org, Michal Hocko , "Rafael J. Wysocki" , Sakari Ailus , Sergey Senozhatsky , Stephen Rothwell , Steven Rostedt Subject: Re: [PATCH] rss_stat: Add support to detect RSS updates of external mm Message-ID: <20191108084707.fwy6junacy4b4fld@pathway.suse.cz> References:<20191106024452.81923-1-joel@joelfernandes.org> <20191106085959.ae2dgvmny3njnk7n@pathway.suse.cz> <20191107180751.GA3846@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To:<20191107180751.GA3846@google.com> User-Agent: NeoMutt/20170912 (1.9.0) 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 Thu 2019-11-07 13:07:51, Joel Fernandes wrote: > On Wed, Nov 06, 2019 at 09:59:59AM +0100, Petr Mladek wrote: > > On Tue 2019-11-05 21:44:51, Joel Fernandes (Google) wrote: > > > Also vsprintf.c is refactored a bit to allow reuse of hashing code. > > > > I agree with Sergey that it would make sense to move this outside > > vsprintf.c. > > I am of the opinion that its Ok to have it this way and I am not sure if > another translation unit is worth it just for this. If we have more users, > then yes we can consider splitting into its own translation unit at that > time. Fair enough. I still think that it would make sense to move the code but I do not want to block this patch because of this. My view is that vsprintf.c is huge and the hashing-related code is lost there. It consists of more pieces, early_param, static key, workqueue work. > If Andrew Morton objects, then I'll do it since the intention was for this > patch to go through his tree and I believe he is Ok with it this way. > > > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > > > index dee8fc467fcf..401baaac1813 100644 > > > --- a/lib/vsprintf.c > > > +++ b/lib/vsprintf.c > > > @@ -761,11 +761,34 @@ static int __init initialize_ptr_random(void) > > > early_initcall(initialize_ptr_random); > > > > > > /* Maps a pointer to a 32 bit unique identifier. */ > > > +int ptr_to_hashval(const void *ptr, unsigned long *hashval_out) > > > +{ > > > + const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)"; > > > > str is unused. > > I believe Andrew has already fixed this in his tree. > > linux-next has local variable removed now: > 7422993b4f8e ("rss_stat-add-support-to-detect-rss-updates-of-external-mm-fix") I see. With this fix, feel free to add: Acked-by: Petr Mladek # lib/vsprintf.c The clean up could be done by a followup patches. Best Regards, Petr