Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6108283imb; Fri, 8 Mar 2019 09:25:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzs8ZAzn+Yw+F6vOfrdxmsZZAV9rXRv8p8CEm7BHP+Dv7FpATpLY8q7M1++WDNEcQjFV1Mf X-Received: by 2002:a62:b508:: with SMTP id y8mr19753319pfe.140.1552065922921; Fri, 08 Mar 2019 09:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552065922; cv=none; d=google.com; s=arc-20160816; b=HFAuO1cVc+TZq/QTC9x7h//j/8PaLbYo6mJRXqIH22DHr+fxOQZl/d8DVoR+ybf5+b AYcaeTj71pLLt1wO9j076388AFbYcjj39vyLVYlguSHRSJc53QYei9V7qPZknF98HTiu mLLIAEn2NsWUgkT/2wcU/1SXw0oEae36ZwxIfUUcGcI+dPNOtV+Szn7Ii7bXggOrB2W8 3c506Klq2ZyBQ2lw922orH6xKsILtc2bePvApqRie000u/+GC5o984yXpLg3fk6EJZhG 4TRl7Lvrxv6tgk2/BgKB5kOMX1NEOLAaudKa/xcRZELtO49UFILoF8zolk2272k3OPDz ldLQ== 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=JbH57hj38dbuvh9sgqbNRJMeCQlSikG1kcp1+esyKsE=; b=nYjW0RIwTtzLrScEWp9HA2NfkMv/2qqcbmUVWr/pfShXXxaJejRYosyw0bbE2m2pRA prWgUAz9aT+DluR7ArCYmL7rK1x+Eno7X1tlAesGkcVUxaS4Vi+p7elOvXtuCQqo6/FO 8Xx2XMrYCcLwvAevriA96WJxgmXfPPDLup7i1peDaS/QVrQEj9IDuwKAI0hjeZaC7Xaq lhvhe34OqKF9nb+LJTeZOh15jfxCDcu0e57/ueaHOqzAgYZYDKhqb3gHvM704I/Yb8b3 0zMlG2fCS/yQxSCZ2iNpy9ekFk8trAbG33o+XqrYrR0DyuQ6h26J5IOvrDNZIianikUM 5y2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=BupmmeZk; 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 k74si7517775pfb.32.2019.03.08.09.25.06; Fri, 08 Mar 2019 09:25:22 -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=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=BupmmeZk; 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 S1726903AbfCHRWX (ORCPT + 99 others); Fri, 8 Mar 2019 12:22:23 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37767 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfCHRWX (ORCPT ); Fri, 8 Mar 2019 12:22:23 -0500 Received: by mail-qt1-f196.google.com with SMTP id a48so22042421qtb.4 for ; Fri, 08 Mar 2019 09:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JbH57hj38dbuvh9sgqbNRJMeCQlSikG1kcp1+esyKsE=; b=BupmmeZkBGvKHTBw9Ba0knKotbsh2ucjHI0nGoWNbNfY/Vz5l98p4lh36/ATOGGIy/ 9kATlqWal45/OVi5k69K+pOW61YgOyiLvZ6r0VrpTgcM+sOfWv88hoQebSU3FIik95m/ nqd7OdcTF0ygteH8C37NMIK2loiV2y+1untflcF5ccuY+lM7Ifx55dznXKhzRlE6DpzN 0oexkJ8SnQGCq+yKpGzbO4uUslVcAW+V7oupFlO+Lnf8/ZjjXcXnppBSPK4iRRUext12 wqA3iL83EOzC7Qf31kwEaU5WWO5d7OKXziWjufIToX8G26BQJNNAxiq2D1WEyceZLyho bvsg== 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=JbH57hj38dbuvh9sgqbNRJMeCQlSikG1kcp1+esyKsE=; b=gdgsrgTZ/jowWFNn6sSiy1TgbARO9ihV2/oFzLhiHK8V5HQODKQQoPn0PT1IL/RBEM yzU+QCyYei4zOQMqeHOiaGio6TjNQfWf55HU3JAXFcTKgc8sqj51HdlBcD9d2k/Dtl1n /oiH+QMa/olvlc5gNfboDiTO30sI2TvQA3aF3kzoWcFpv1qoKVONeSBvEvgIFAGIJ4KV GEPn3Y/wbO5/0AJR+hcWGAYuZvtDcIkcK6hD/wPmIA7hPkTw1H+u1E6tlNl9Yv/bZHo8 9MaUAv6gp+1yaiImHc0ybgFuGRXC8iCZ5swhpcLNgbPjNxEbC6SbCq7vOpBH0+szIwGo /OlQ== X-Gm-Message-State: APjAAAX+QsjRxH8SXPSZZPwlSFKN+xF1lzaJfgGOBSSsiICcB1wt0NyU OfHVP42FGfHXx4st49hw/ZdC1g== X-Received: by 2002:a0c:b785:: with SMTP id l5mr15957092qve.225.1552065742151; Fri, 08 Mar 2019 09:22:22 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id n27sm2064404qtf.11.2019.03.08.09.22.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2019 09:22:21 -0800 (PST) Date: Fri, 8 Mar 2019 12:22:20 -0500 From: Josef Bacik To: Andrea Righi Cc: Josef Bacik , Tejun Heo , Li Zefan , Paolo Valente , Johannes Weiner , Jens Axboe , Vivek Goyal , Dennis Zhou , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] blkcg: sync() isolation Message-ID: <20190308172219.clcu6ehjav6y2hxi@MacBook-Pro-91.local> References: <20190307180834.22008-1-andrea.righi@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307180834.22008-1-andrea.righi@canonical.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 07:08:31PM +0100, Andrea Righi wrote: > = Problem = > > When sync() is executed from a high-priority cgroup, the process is forced to > wait the completion of the entire outstanding writeback I/O, even the I/O that > was originally generated by low-priority cgroups potentially. > > This may cause massive latencies to random processes (even those running in the > root cgroup) that shouldn't be I/O-throttled at all, similarly to a classic > priority inversion problem. > > This topic has been previously discussed here: > https://patchwork.kernel.org/patch/10804489/ > Sorry to move the goal posts on you again Andrea, but Tejun and I talked about this some more offline. We don't want cgroup to become the arbiter of correctness/behavior here. We just want it to be isolating things. For you that means you can drop the per-cgroup flag stuff, and only do the priority boosting for multiple sync(2) waiters. That is a real priority inversion that needs to be fixed. io.latency and io.max are capable of noticing that a low priority group is going above their configured limits and putting pressure elsewhere accordingly. Tejun said he'd rather see the sync(2) isolation be done at the namespace level. That way if you have fs namespacing you are already isolated to your namespace. If you feel like tackling that then hooray, but that's a separate dragon to slay so don't feel like you have to right now. This way we keep cgroup doing its job, controlling resources. Then we allow namespacing to do its thing, isolating resources. Thanks, Josef