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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 172EFC37120 for ; Mon, 21 Jan 2019 21:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E158F21019 for ; Mon, 21 Jan 2019 21:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727168AbfAUVrR (ORCPT ); Mon, 21 Jan 2019 16:47:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46612 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfAUVrQ (ORCPT ); Mon, 21 Jan 2019 16:47:16 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C2F97F6CB; Mon, 21 Jan 2019 21:47:16 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 118C1648AF; Mon, 21 Jan 2019 21:47:15 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 7771922024A; Mon, 21 Jan 2019 16:47:15 -0500 (EST) Date: Mon, 21 Jan 2019 16:47:15 -0500 From: Vivek Goyal To: Andrea Righi Cc: Josef Bacik , Tejun Heo , Li Zefan , Johannes Weiner , Jens Axboe , Dennis Zhou , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/3] cgroup: fsio throttle controller Message-ID: <20190121214715.GA27713@redhat.com> References: <20190118103127.325-1-righi.andrea@gmail.com> <20190118163530.w5wpzpjkcnkektsp@macbook-pro-91.dhcp.thefacebook.com> <20190118184403.GB1535@xps-13> <20190118194652.gg5j2yz3h2llecpj@macbook-pro-91.dhcp.thefacebook.com> <20190119100827.GA1630@xps-13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190119100827.GA1630@xps-13> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 21 Jan 2019 21:47:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 19, 2019 at 11:08:27AM +0100, Andrea Righi wrote: [..] > Alright, let's skip the root cgroup for now. I think the point here is > if we want to provide sync() isolation among cgroups or not. > > According to the manpage: > > sync() causes all pending modifications to filesystem metadata and cached file data to be > written to the underlying filesystems. > > And: > According to the standard specification (e.g., POSIX.1-2001), sync() schedules the writes, but > may return before the actual writing is done. However Linux waits for I/O completions, and > thus sync() or syncfs() provide the same guarantees as fsync called on every file in the sys‐ > tem or filesystem respectively. > > Excluding the root cgroup, do you think a sync() issued inside a > specific cgroup should wait for I/O completions only for the writes that > have been generated by that cgroup? Can we account I/O towards the cgroup which issued "sync" only if write rate of sync cgroup is higher than cgroup to which page belongs to. Will that solve problem, assuming its doable? Vivek