Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp20652742ybl; Sun, 5 Jan 2020 07:48:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzcbvEAsaVSM4n036vS1pdXf+Y/tHi/u/ojyFmf4+SFzvABvCXMy6G9M12nX79715lQKwUi X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr104866553otr.167.1578239313303; Sun, 05 Jan 2020 07:48:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578239313; cv=none; d=google.com; s=arc-20160816; b=DChOIVfBC9e2OLeBum+ZBnRs0ECmHHTull5oistPiDfz716tv2hpvCFKFc3wEagYFb NJhB5BRfAxDwOc+IWJVotvJW5WM6222ncErJSVVFUpW4Sjjp1uW14tzaUo6OVWWVVFfk aWUDNUT0b+LDoj1MKv1CYsFIP40HetoV9kghzjhG5gamTRVH1iSzXwDkatPfG8HWa4Lf V4ht5OCMco6ne0o6gCvCdiOn+1/M4Km96UikYCrFwoOmDnJPo3rl2UWzxZ0kLSJ4enpB ie5Exu+5m2aSS/QZ6aFuGros0kHhhke6W5mH2pj16X21pndaFoBw/nAujxPz/Ppv9YCa itoA== 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:dkim-signature; bh=vRfWEHnVkhzZGHppIXbPu5pXNLuoe7MfNGwreTJCCF0=; b=LHUJuJ1tqxRsPRSpjF3DW4AyJRJHPgAgsHxarEAUaCnVM1y9EPd8KKZPK4Wm84oiRT ueLlLZ3lsb+WKT8xTJe60adiGMK+enzcWMrcmirXm/zw5PrzrB9v4Ku0jmyNzSdiKS9r /RzfXZ0jkN1wmEmCeDHdgkwSBnX/s9eGlpYOk/zrTL5eWfPnW0IVoE8YY6Mt76ozMGld kwrN119oxZq46Y8IDK3TXl8qrWuaO3Fc+pawLiaOBZ7kVDmWgWPvNkJKTkJNmtN7QVxg PcDd9sxZUhbWvO6uVAyf/gUbmcq6oATR0Am7uGGdCqokS9dnoON/5g0pJMn0fqypXzNp wFRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0BMiktE5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si36071200otk.215.2020.01.05.07.48.20; Sun, 05 Jan 2020 07:48:33 -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; dkim=pass header.i=@kernel.org header.s=default header.b=0BMiktE5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgAEPrj (ORCPT + 99 others); Sun, 5 Jan 2020 10:47:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:35680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726212AbgAEPri (ORCPT ); Sun, 5 Jan 2020 10:47:38 -0500 Received: from localhost (unknown [73.61.17.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A6E212077B; Sun, 5 Jan 2020 15:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578239258; bh=/dAZarcvxCsitg+Stew117r8KkhBn7Ok0MYDAr0QGSg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0BMiktE5AmVX1DuclgiX4Xh7K1fR7MvDPGCFJhyUVw4ugE64T2uLtMo2NkEODBDkd bTKCOssnS2YLnsywJgnTCGX+qzbpYYcCJelya8GkKnGpFBIeBVF3iX85528SJFjdt4 V5k/md871fsY+d0r6coalr3guCQOsFWqDvzLxSfc= Date: Sun, 5 Jan 2020 10:47:35 -0500 From: Sasha Levin To: Pavel Machek Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Johannes Weiner , Chris Down , Vlastimil Babka , David Hildenbrand , Michal Hocko , Alexey Dobriyan , Andrew Morton , Linus Torvalds Subject: Re: [PATCH 4.19 071/114] kernel: sysctl: make drop_caches write-only Message-ID: <20200105154735.GQ16372@sasha-vm> References: <20200102220029.183913184@linuxfoundation.org> <20200102220036.228967185@linuxfoundation.org> <20200103182911.GE14328@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200103182911.GE14328@amd> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 03, 2020 at 07:29:11PM +0100, Pavel Machek wrote: >Hi! > >> From: Johannes Weiner >> >> [ Upstream commit 204cb79ad42f015312a5bbd7012d09c93d9b46fb ] >> >> Currently, the drop_caches proc file and sysctl read back the last value >> written, suggesting this is somehow a stateful setting instead of a >> one-time command. Make it write-only, like e.g. compact_memory. > >I have no problem with that, but is it good idea for stable? Usually I'd drop it, yes. In this case it seems like it made "real" users interact with the switch incorrectly, which I parse as a bug. >Plus, I seem to recall that drop_caches was somehow dangerous, >debugging-only stuff, one should not use on production system. Did >that get fixed in the meantime? Sounds like it's being used in production, at scale, so I'd hope so :) -- Thanks, Sasha