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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 1CFEFC33CAE for ; Mon, 13 Jan 2020 22:21:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C54C8207FF for ; Mon, 13 Jan 2020 22:21:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AZkS3aHZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C54C8207FF Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 523728E0006; Mon, 13 Jan 2020 17:21:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FB048E0003; Mon, 13 Jan 2020 17:21:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4375C8E0006; Mon, 13 Jan 2020 17:21:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 2ECA38E0003 for ; Mon, 13 Jan 2020 17:21:46 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id D96E6180AD815 for ; Mon, 13 Jan 2020 22:21:45 +0000 (UTC) X-FDA: 76374034170.30.coat30_f5a200d4eb39 X-HE-Tag: coat30_f5a200d4eb39 X-Filterd-Recvd-Size: 4135 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jan 2020 22:21:45 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id 59so10552452otp.12 for ; Mon, 13 Jan 2020 14:21:45 -0800 (PST) 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=ex3UFTMAEfhKx0guG0nwsJE0zOFUmspUTiiCdQZAYOo=; b=AZkS3aHZwBxsqylTsn1eEWpbfT0deg5vrOTs7LiyGB8g1lnK6FH2+UfYXBWvkY6ULv L2AahUncm3u08u2KnFq3IkcZNVLL+0q4Df/VS2nMgtdTEfhMV6UmkKoHEo30LFduORFW lNtWDDlPGuB18xsIfzirjOzb5FUEr8JVFbQ9lixTPZk9w8y2vYfwtQWfryXPkGPPJmEo tw1PmN8C9ibxP8UQDb/8CkVIA+vS9SZrs1AqtZyUwsA44pNP5dS4Vm06VWqn+YiWccoj 7cM9PqJcK+T1kfuzzQlB+nt4mJ/rZmLAEFfmiWh12bHooq+Vhe2YKTYhcZvmM4l2p4UK Lc6w== 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=ex3UFTMAEfhKx0guG0nwsJE0zOFUmspUTiiCdQZAYOo=; b=aE+t59vvHljJjA7+sYz3ebQX1gTR1wf/y/irB01ELHNzuHjuxsmiaVS1zU4aGdE3K/ emIDlE0x1cx84FafFR5ojDcLG4fyEJBpQxmsPo12HVJujV8ufgM+dgKSki2chknXKrgj +6ew4SsMm6iyKe3HoIvzrXRRnIUZORYMiBjrgCvwjUMNz/N3Q5TLfYw+FEQvJSJkrWul p4thx3HkLuEzE8r2V4pp61sk7WSM36h7B9F5pTwojXqX3wMwac2TOZy6/TN0YLCB/T3X UtI7c1tefSNkUhS4D84kRrcMLYHZ/5vGGMp3rQ0W2vFUU6CzVC5btFP5A/+ij9eeAlcH H/cw== X-Gm-Message-State: APjAAAW2jqK1QJapyI1WaZQoLyG3E1St5WOYI0NVpvE7kIaZbN0Jd8Jl LBe8Bxq08bMfPOP4APJYyr+XUX8P2NEZBAMp4YEzeg== X-Google-Smtp-Source: APXvYqyrwZQq75+I2BdkZCiafYfDDHWMS1tOXED+Q+CkQ89ZkgEcOJ+i4XsDk7VSWnoOQlqxRkrnw6Hl75zqF784lYs= X-Received: by 2002:a9d:2c68:: with SMTP id f95mr15033850otb.33.1578954104459; Mon, 13 Jan 2020 14:21:44 -0800 (PST) MIME-Version: 1.0 References: <20191217231615.164161-1-almasrymina@google.com> <817e2c4b-4c72-09f9-22ea-bbaf97584161@oracle.com> In-Reply-To: From: Mina Almasry Date: Mon, 13 Jan 2020 14:21:33 -0800 Message-ID: Subject: Re: [PATCH v9 1/8] hugetlb_cgroup: Add hugetlb_cgroup reservation counter To: Mike Kravetz Cc: shuah , David Rientjes , Shakeel Butt , Greg Thelen , Andrew Morton , open list , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, Aneesh Kumar , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Hillf Danton Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000054, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > >> On 12/17/19 3:16 PM, Mina Almasry wrote: > > > > The design we went with based on previous discussions is as follows: > > hugetlb pages faulted without a prior reservation get accounted at > > fault time, rather than reservation time, and if the fault causes the > > counter to cross the limit, the charge fails, hence the fault fails, > > hence the process gets sigbus'd. > > Ok, sorry I did not recall the design discussion. > No worries! It has indeed been a while since that discussion. > > This means that one counter I'm adding here can cover both use cases: > > if the userspace uses MAP_NORESERVE, then their memory is accounted at > > fault time and they may get sigbus'd. > > Let's make sure this is clearly documented. Someone could be surprised > if their application not using reserves gets a SIGBUS because there is a > reserve limit. I have some stuff on that already in the docs patch, but I'll beef that section up to ensure there is no confusion.