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=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 B1377C43603 for ; Tue, 17 Dec 2019 15:28:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72A1024672 for ; Tue, 17 Dec 2019 15:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="gJUT5JEs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72A1024672 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18B388E0087; Tue, 17 Dec 2019 10:28:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 13B228E0079; Tue, 17 Dec 2019 10:28:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0293E8E0087; Tue, 17 Dec 2019 10:28:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id E1EE98E0079 for ; Tue, 17 Dec 2019 10:28:17 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 966CE180AD801 for ; Tue, 17 Dec 2019 15:28:17 +0000 (UTC) X-FDA: 76275014634.13.ocean69_485eb2d5d4328 X-HE-Tag: ocean69_485eb2d5d4328 X-Filterd-Recvd-Size: 4380 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Dec 2019 15:28:17 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id p9so3342998wmc.2 for ; Tue, 17 Dec 2019 07:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yZaScq9Meta77Nqt7I5hQ1kZiSA6MbL950o5EmEfNTs=; b=gJUT5JEsQl19+ZNt2Qx+/ZHcNIpwMpLwtmc3WAvlw5J9AGWaaFAnfS5qHUWnFdoq/Z Iu//JE+EtIRQpbdrMqEyYt1JCBMeCaj/mM58p+f9ACzA8KWvvykDijI2qRDt1Hyj90vf xXrj8zrMTMHBvMieWexBUEwa23r7dw16hd29k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yZaScq9Meta77Nqt7I5hQ1kZiSA6MbL950o5EmEfNTs=; b=Cqh3P6lx6tWmRj6rus3cdj2fAmu9TvHXyAjng6YZacNmI5PjQirl3IevkKNfPUPp2p 5glUn77eibw5wra9saP3mkg+Z2i/vY0XArELQ+dOPZu+vab3ypH7fG+gnSDBtltJhvFe Tya5GHSWSWda9B8++tCXsAFZnzGO7EKPTyPuvfKs21M2LpDEqy0QnewWePh9b93UR5Xw JZTJepIsOfNl3tv+fXgcD+MB6jZFNTTJJ/unGIqPMAaAtGb5xw9pQ1fV4meNNtGqPnZs C9y6KrZH4/aNcKJsBFH5Fi/gHEJtItV9Wl29XmayVwIybSfJhD0bJ0aybJiyUf42xAaH i8+A== X-Gm-Message-State: APjAAAXQYrcXCNqtJUIBbveH5oV4DHsEuX/3gVWqWkU0b+M+dEvEbooL eTrtRnEQJSupw/2akxtm1MLY3sR3S1s= X-Google-Smtp-Source: APXvYqziinXdsDWd25fUTn71tFQcAyW8kL5+5ZZ4tQ19HnR+LmDyJLSzMSxxsCE0HKdA/CJhZLV6Ig== X-Received: by 2002:a05:600c:22d3:: with SMTP id 19mr6253388wmg.20.1576596495995; Tue, 17 Dec 2019 07:28:15 -0800 (PST) Received: from localhost ([2620:10d:c092:180::1:f184]) by smtp.gmail.com with ESMTPSA id o194sm3477838wme.45.2019.12.17.07.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 07:28:15 -0800 (PST) Date: Tue, 17 Dec 2019 15:28:14 +0000 From: Chris Down To: Michal Hocko Cc: Qian Cai , Kuninori Morimoto , Johannes Weiner , Vladimir Davydov , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: memcontrol.c: move mem_cgroup_id_get_many under CONFIG_MMU Message-ID: <20191217152814.GB136178@chrisdown.name> References: <20191217135440.GB58496@chrisdown.name> <392D7C59-5538-4A9B-8974-DB0B64880C2C@lca.pw> <20191217144652.GA7272@dhcp22.suse.cz> <20191217150921.GA136178@chrisdown.name> <20191217151931.GD7272@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191217151931.GD7272@dhcp22.suse.cz> X-Bogosity: Ham, tests=bogofilter, spamicity=0.004341, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Michal Hocko writes: >On Tue 17-12-19 15:09:21, Chris Down wrote: >[...] >> (Side note: I'm moderately baffled that a tightly scoped __maybe_unused is >> considered sinister but somehow disabling -Wunused-function is on the table >> :-)) > >Well, I usually do not like to see __maybe_unused because that is prone >to bit-rot and loses its usefulness. Looking into the recent git logs >most -Wunused-function led to the code removal (which is really good >but the compiler is likely to do that already so the overall impact is >not that large) or more ifdefery. I do not really see many instance of >__maybe_unused. Hmm, but __maybe_unused is easy to find and document the reasons behind nearby, and then reevaluate at some later time. On the other hand, it's much *harder* to reevaluate which functions actually are unused in the long term if we remove -Wunused-function, because enabling it to find candidates will result in an incredibly amount of noise from those who have missed unused functions previously due to the lack of the warning. Maybe Qian is right and we should just ignore such patches, but I think that comes with its own risks that we will alienate perfectly well intentioned new contributors to mm without them having any idea why we did that.