Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp721473ybi; Fri, 24 May 2019 10:20:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYmBcaokmcj42P5ytc3AWyQg8LGvRpX1SGvbOPl6Mnss4ELYwpx4pD0uOZgRoT2sOIPeEJ X-Received: by 2002:aa7:9563:: with SMTP id x3mr31544420pfq.118.1558718406463; Fri, 24 May 2019 10:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558718406; cv=none; d=google.com; s=arc-20160816; b=M6moPATpiOm0lMaen2DMOd/3rye6QZKjDcyxNwEZp7xR/posu1QXgOHdyvfNU6ow/x /1ds/s29aIIEGGyZ1X3zeIURwjT856Q4+44JoTXRI2viFaxtYSwQY1NNAQWLc01tb6sU Hqsuq63Gnepw2vIhg79aoNSxz1nTwaD2/cLQ+7bDhzZMO5Ji8nUCqcnuPab7PiuSh8t2 0Y6/qhjxB7Dw73qyg6ncQBjw7CrthV3IxcdrCTFRprKsuK2c1jdOU2RN/Lh4DWdDufQ7 Me3L/CMjWRchE4kubPSOk4DPpRC6hOlrCbIZ9zqDxsemucOYSXlTfWmlROSbMXV2UGow EfOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7fjzoEk7VHLdIfi/lCjGQJd6xWD7AQcbop/UJoQp2cg=; b=fJPLO2z88h3zac2NsKmTsmyu0WkxqX0SlYYtCMqH5eNZW5EFNf4HTENdngyW2r6ec6 4SAR4GXTPOIpK75ABErc+2T1myJZVx8uqjTAJyFWpQs0n5+SAd7yHvr62ZcaWMor4W0I JBYtyyxc/ugpPi1M2cU7Vw5LWqW9Tuubj66IRxEox+9sfsP5SRDYYcKoE0/k5gflwgFe /fQ+FsAUgaBs3V783H9DF8LOKaR3KHUo4kBDAFk0cU8d1mBwRGtBs+CCSeXjuIVf4vjn tffIVm40uC/C9a2kdi1AuMtqOQi6kj0diyre7sOU9CbBIIEE2BD2FhtnfVYtQ/E7yGhD cb1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="a/c5aNCz"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si5124015pgp.572.2019.05.24.10.19.51; Fri, 24 May 2019 10:20:06 -0700 (PDT) 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=@google.com header.s=20161025 header.b="a/c5aNCz"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731940AbfEXRSR (ORCPT + 99 others); Fri, 24 May 2019 13:18:17 -0400 Received: from mail-yw1-f54.google.com ([209.85.161.54]:42933 "EHLO mail-yw1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731460AbfEXRSR (ORCPT ); Fri, 24 May 2019 13:18:17 -0400 Received: by mail-yw1-f54.google.com with SMTP id s5so3904105ywd.9 for ; Fri, 24 May 2019 10:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7fjzoEk7VHLdIfi/lCjGQJd6xWD7AQcbop/UJoQp2cg=; b=a/c5aNCzXO7PLBa6Ssaqn9PV4rrkGxnsM1xHZvBruNhViUf57ByhvKw3LDYheK9AVn 7xJweo6a0bX6nCiUyOF7CyQkSOrwCnrRYJodZ7ZURffExgzgfwIZtij7VsdWYDlFMm4J CeQpx3k3MuKNFnJsl8HBdrM9eCTBqU2bjRihv6CICpP+ObFN3uYNQbM08yATD9rZYezo piWyxLCsiAi33onCQZ2vc9k53xG1v6VSYYloF6+HRn+tDtjZuHI2YULEcjbfU8sP7s9a LQDhUD/jirMOuLBVgP1pGxJ/WeylORNTxm5AX/+Ce1SLL+O7QVCsp/KxF6araNp75DBt JthQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7fjzoEk7VHLdIfi/lCjGQJd6xWD7AQcbop/UJoQp2cg=; b=j2LQPcC2egaqGh+jK3Ot6orfhCCdl0kW5ms4ejo7V0ZO3qx9EZGpvNMDgpI0jjnFt6 IdrVODES61pkylktJE903oXzoPWZT7YIAnWmj4Emojp/KBmbIIVxVd5fkFitvbYuat+S n2bZF8N1H583v5DFsLq9eT8lalOJOR+O9Y51hNx4HhLaK6hq88V7SCukDPFI/UuqBHtv 30k/+Itow5oQ4eqeOdqX1CKHIbhOLV5oOERquWlukO1p0TkP5Liazqo36XdOUTok+h+k hZ+XFD5t9SLzcXqkl4cuJenz+Xb1+BWP4L2fhNfIOKLUJ0nwFmwicdVFjIiN8kZinPH2 J9mg== X-Gm-Message-State: APjAAAXUkb2dRvzsiC0o/ysabcDZwJNtzPqeaY/cJMdC/k6lEo/4L9XO GdBJu3aPH/OMBIPOHNfmQpvGp+fCSrRvtfhNUWr5QQ== X-Received: by 2002:a81:7cc2:: with SMTP id x185mr11843465ywc.10.1558718295643; Fri, 24 May 2019 10:18:15 -0700 (PDT) MIME-Version: 1.0 References: <20190523174349.GA10939@cmpxchg.org> <20190523183713.GA14517@bombadil.infradead.org> <20190523190032.GA7873@bombadil.infradead.org> <20190523192117.GA5723@cmpxchg.org> <20190523194130.GA4598@bombadil.infradead.org> <20190523195933.GA6404@cmpxchg.org> <20190524161146.GC1075@bombadil.infradead.org> <20190524170642.GA20546@cmpxchg.org> In-Reply-To: <20190524170642.GA20546@cmpxchg.org> From: Shakeel Butt Date: Fri, 24 May 2019 10:18:04 -0700 Message-ID: Subject: Re: xarray breaks thrashing detection and cgroup isolation To: Johannes Weiner Cc: Matthew Wilcox , Andrew Morton , Linux MM , linux-fsdevel , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 10:06 AM Johannes Weiner wrote: > > On Fri, May 24, 2019 at 09:11:46AM -0700, Matthew Wilcox wrote: > > On Thu, May 23, 2019 at 03:59:33PM -0400, Johannes Weiner wrote: > > > My point is that we cannot have random drivers' internal data > > > structures charge to and pin cgroups indefinitely just because they > > > happen to do the modprobing or otherwise interact with the driver. > > > > > > It makes no sense in terms of performance or cgroup semantics. > > > > But according to Roman, you already have that problem with the page > > cache. > > https://lore.kernel.org/linux-mm/20190522222254.GA5700@castle/T/ > > > > So this argument doesn't make sense to me. > > You haven't addressed the rest of the argument though: why every user > of the xarray, and data structures based on it, should incur the > performance cost of charging memory to a cgroup, even when we have no > interest in tracking those allocations on behalf of a cgroup. > > Which brings me to repeating the semantics argument: it doesn't make > sense to charge e.g. driver memory, which is arguably a shared system > resource, to whoever cgroup happens to do the modprobe / ioctl etc. > > Anyway, this seems like a fairly serious regression, and it would make > sense to find a self-contained, backportable fix instead of something > that has subtle implications for every user of the xarray / ida code. Adding to Johannes point, one concrete example of xarray we don't want to charge is swapper_spaces. Swap is a system level resource. It does not make any sense to charge the swap overhead to a job and also it will have negative consequences like pinning zombies. Shakeel