Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2176347ybx; Fri, 8 Nov 2019 00:50:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwQjLML/lScsZPtrK0U3/SescDHuotA/wlgxS32R9khqAmc3BdIl2QhYkJtUdCZf13zSiHp X-Received: by 2002:a17:906:a388:: with SMTP id k8mr7270530ejz.223.1573203036942; Fri, 08 Nov 2019 00:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573203036; cv=none; d=google.com; s=arc-20160816; b=IjxTSLBEYYORzsPzinZqJsk2ZL9NVrPKgj9B2y+ERfFsKmayQ0ASZW2tf+pQ+x2Mp1 RszAhskR8ZTcNIj8MDNhdE8oB6XoHkXGhXXtqueIgKrn/WWvV4RufWekd9Gv88FrEsV/ 6YpCjxlTUUaQgqMtAk7uHVqq1L8FiYpX7N+EYVBVKlWI9AemOKrkHUGkykByQ5R7B9s2 ZWYSf/Z1R5vygj/Zqkk9SotzlNOLboskb//LVz39rl+B3H3dSWztiaqAL1dxCACW7WoJ pqaYwl3X3rUEFGFMmsw57OX6Cc421ZBGlGq14EygVCHGO3HOVRJwdZAl+5+4dN/NPLJg 2djw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=SAKgvmu6VM8VdsOKQiegf2xrwpKI0sxr2gwBXzuT4rI=; b=Z31hWkr9ZbGACWKSAbDpUurO535mLHOOYK4ZXo+mAtHf+70B1tmvlI3C/0uie2vnpr OU77rMa7KCp30y6rInnnRo2pkCmZ+zIwsYR6CAQuODiilw+aTw/3TFtvpyOn7J+8FKtm z7xCyC8X9zX2rRdb4sxO8GjHRPhr8YjbQqUEif2BBs3FRt5/HiEa59uB2w5G7LKLqN9P 4E4aLd98jWQ5YK+znnSyer8OUlCvF7hOlBSI5Zwl91FRIWEyUdK/6aZR8rL5yFK7WDL1 VRglbkIzabKjUfSfUjEJybufX1oR77JcF3kCGbWCuNodxNkTSadT9NgfNynJ3kyqsm38 Y3tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si3472627ejv.159.2019.11.08.00.50.13; Fri, 08 Nov 2019 00:50:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730221AbfKHIrL (ORCPT + 99 others); Fri, 8 Nov 2019 03:47:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:37096 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725975AbfKHIrK (ORCPT ); Fri, 8 Nov 2019 03:47:10 -0500 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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