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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 A03F8CA9ED1 for ; Fri, 1 Nov 2019 14:45:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C501B20650 for ; Fri, 1 Nov 2019 14:45:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="rak1UdTK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C501B20650 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5E7DC6B0276; Fri, 1 Nov 2019 10:45:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BF5E6B0278; Fri, 1 Nov 2019 10:45:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D5186B027A; Fri, 1 Nov 2019 10:45:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 2AF466B0276 for ; Fri, 1 Nov 2019 10:45:45 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id CDEE9180AD81C for ; Fri, 1 Nov 2019 14:45:44 +0000 (UTC) X-FDA: 76107982608.26.board90_4f26c9c7aa039 X-HE-Tag: board90_4f26c9c7aa039 X-Filterd-Recvd-Size: 4617 Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Fri, 1 Nov 2019 14:45:43 +0000 (UTC) Received: by mail-qt1-f193.google.com with SMTP id o11so8141703qtr.11 for ; Fri, 01 Nov 2019 07:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LZCWc31JbQup46mMGhgcePz/DKEu83nRcaKlxz0M1jA=; b=rak1UdTKjdXl/zlJlBJ/kQrrFtcFehWyyU0y8OnNXTn50FzcEjIJMQOYIBmCw3wgBv M0+WfKaDiw79cAa73mTLnmrBSloKYmCNwD+JCV2I2ggyP5tJTxZdvra5mX+cpcfRr5C/ DmFwLQvlcZfPF135SEUV8S2/Kzgf2HMatwwp+RsBzhBKyYPNuf7O3nEbCxC6adOrxDRU CZ2WwvEOn5b5QymFWpQNBzzLuFBQ220URoMquKw2RQ0aZ6JyGYava298qsGg0MO0X4fW smtEW+gfvrm5T1tFeRrGTdfLUV5oXyFLNtFAQGsdbVFG9XAwdf1fO7H+UHH7xrtDV6KL SnrQ== 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:user-agent; bh=LZCWc31JbQup46mMGhgcePz/DKEu83nRcaKlxz0M1jA=; b=Lz2eyQL9FDSJzM5C+E0cEak0NBsvhBeGnK4HYh07JxBl+UsDFjpYvJfA3IoW34ckRY IDbGNUH/mssHVkcupv7EZUHrMZPV9c8sYhelrSFZr/r8GbnJWJJurUa5TgPNpgh9VMLv +9/Q8FdWa01U4LRqulwW5hQWr0nXlhZdlyhFMeNsRfsGba5YYvOwtKGgkuqxoyPP4XlJ v5mJJkvnIDo+ZE1STXU58Mp5fMB5tvRduaSz+mcZos/lERKxaFX/MjjvWwyfDT31P5la D0XHZ1OYc2QzplqGVImwZUN5iCmhMVcM5phVFcbwTP9C4mwTqMsPVw3b6MbQw4km1Gbi 2yVA== X-Gm-Message-State: APjAAAXI35gIET6iwr0PEsSzqe0lTCsEiJ0MpnUEJDms88nNcelHfoo+ ZjedWFvmX+1HsGiwy6tBkkbgPg== X-Google-Smtp-Source: APXvYqzcURMngGFdoa699OwPdXUeg4D6sDMyO6d3bUY+B6ZBaWp3YgpbvJaCF+QNuJpUxJssDXbeZQ== X-Received: by 2002:ac8:6757:: with SMTP id n23mr376349qtp.345.1572619542663; Fri, 01 Nov 2019 07:45:42 -0700 (PDT) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id 19sm3976066qkg.89.2019.11.01.07.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 07:45:41 -0700 (PDT) Date: Fri, 1 Nov 2019 10:45:40 -0400 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] kernel: sysctl: make drop_caches write-only Message-ID: <20191101144540.GA12808@cmpxchg.org> References: <20191031221602.9375-1-hannes@cmpxchg.org> <20191031162825.a545a5d4d8567368501769bd@linux-foundation.org> <20191101110901.GB690103@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191101110901.GB690103@chrisdown.name> User-Agent: Mutt/1.12.2 (2019-09-21) 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 Fri, Nov 01, 2019 at 11:09:01AM +0000, Chris Down wrote: > Hm, not sure why my client didn't show this reply. > > Andrew Morton writes: > > Risk: some (odd) userspace code will break. Fixable by manually chmodding > > it back again. > > The only scenario I can construct in my head is that someone has built > something to watch drop_caches for modification, but we already have the > kmsg output for that. > > > Reward: very little. > > > > Is the reward worth the risk? > > There is evidence that this has already caused confusion[0] for many, > judging by the number of views and votes. I think the reward is higher than > stated here, since it makes the intent and lack of persistent API in the API > clearer, and less likely to cause confusion in future. > > 0: https://unix.stackexchange.com/q/17936/10762 Yes, I should have mentioned this in the changelog, but: While mitigating a VM problem at scale in our fleet, there was confusion about whether writing to this file will permanently switch the kernel into a non-caching mode. This influences the decision making in a tense situation, where tens of people are trying to fix tens of thousands of affected machines: Do we need a rollback strategy? What are the performance implications of operating in a non-caching state for several days? It also caused confusion when the kernel team said we may need to write the file several times to make sure it's effective ("But it already reads back 3?").