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 9F53EC35247 for ; Mon, 3 Feb 2020 23:16:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28CF920721 for ; Mon, 3 Feb 2020 23:16:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PuWaEsvT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28CF920721 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 CAB856B0005; Mon, 3 Feb 2020 18:16:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C81DA6B0006; Mon, 3 Feb 2020 18:16:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B97B06B0007; Mon, 3 Feb 2020 18:16:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id A13746B0005 for ; Mon, 3 Feb 2020 18:16:33 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4E913824805A for ; Mon, 3 Feb 2020 23:16:33 +0000 (UTC) X-FDA: 76450377066.27.board21_73640e5c81307 X-HE-Tag: board21_73640e5c81307 X-Filterd-Recvd-Size: 4227 Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Mon, 3 Feb 2020 23:16:32 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id r27so15348366otc.8 for ; Mon, 03 Feb 2020 15:16:32 -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=Gsc+LSdKFmfEHsLu/PX4b/f2W5uTYqD7V4ZzUh0Ir80=; b=PuWaEsvTmioKz64Q7uPVIOp/N9rPTq6akD7fqQtuRHWmOto7GXFjEFiiaZpfiF2Oxm iiczLvMdxA7gX9/mjBZ8ZtnwN2sHqrC4OBRhqMuKo/g8CFJUF+GRekmD2R+YG1Iv8ntP fvondbVEOz76kPzh9Un/lXTwJbkoWs/H0ReXrgjISGWRnNPuEoN9WDxUbtR5u29xfZkT oAskXk7P2RCKYytwQ3FeJKx5ywr9hbBBXemLv/eTKuTK7Wqc8IrNS1TLr78w9ZSqkxGE M2MJ58f6NMmbvet66LP8q6Ze6KZ4eCoAqPGksDNrj2NLgtH1atGYQqMO7zviLvsOv0oa pnWQ== 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=Gsc+LSdKFmfEHsLu/PX4b/f2W5uTYqD7V4ZzUh0Ir80=; b=qmnakQP6yOw9qy1Ox3m0Ppeer8qkovr1o6swzplc5+gh5TqdQ5F/Dx1iCkB8LKI25D mK0LN8nYmuZC0VBttur9YS9BCsGdFoP09qRBNHIx3S8Fh9Xz647MVgYbAsDNMAWPNwDy eFYcaLMDMykJRJRsYGOsk+rOxm76B1q2B6VKYtROzBXN/0kEPjLw51Dr1Zd5vLoPoTqB bfxS+K1n4DuxFmQngT+/dtWBMmqv4/lfv3ESK1IToFjW5AJnsfWtmnIF1HZ52zid45OK DWxW47hQmZSQGcuA6KogZy3npxSeKNPWIJ8phibDSxwPBiwT+SM4BN+wfks+y9TTyYYQ wQ+g== X-Gm-Message-State: APjAAAWIolKwv46UT8DSwf+kNEaPhj0SO3XtbwWJ8i1JG832+ff0VP+i /gHy2uNeywcXPRKPh+EMPjd7l7QWk+FfnXy5xrShvg== X-Google-Smtp-Source: APXvYqxks0BGaZknNqKFAhn+gbM4R5qvozx7t1UrbqkSMA2wJouCmnamEYFBah6ouIgs/03HiorFYLE+SdLRPuvskdA= X-Received: by 2002:a9d:518b:: with SMTP id y11mr18610845otg.349.1580771791890; Mon, 03 Feb 2020 15:16:31 -0800 (PST) MIME-Version: 1.0 References: <20200115012651.228058-1-almasrymina@google.com> In-Reply-To: From: Mina Almasry Date: Mon, 3 Feb 2020 15:16:21 -0800 Message-ID: Subject: Re: [PATCH v10 1/8] hugetlb_cgroup: Add hugetlb_cgroup reservation counter To: David Rientjes Cc: Mike Kravetz , Shakeel Butt , shuah , Greg Thelen , Andrew Morton , open list , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, Aneesh Kumar Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > > Proposed Solution: > > A new page counter named > > 'hugetlb.xMB.reservation_[limit|usage|max_usage]_in_bytes'. This counter has > > slightly different semantics than > > 'hugetlb.xMB.[limit|usage|max_usage]_in_bytes': > > > > Changelog looks like it needs to be updated with the new resv naming. > I updated to the rsvd naming, which you suggested earlier and Mike agreed was better. > > + > > static inline > > struct hugetlb_cgroup *hugetlb_cgroup_from_css(struct cgroup_subsys_state *s) > > { > > Small nit: hugetlb_cgroup_get_counter(), to me, implies incrementing a > reference count, perhaps a better name would be in order. No strong > preference. > Changed > > /* Add the events file */ > > - cft = &h->cgroup_files_dfl[2]; > > + cft = &h->cgroup_files_dfl[4]; > > snprintf(cft->name, MAX_CFTYPE_NAME, "%s.events", buf); > > cft->private = MEMFILE_PRIVATE(idx, 0); > > cft->seq_show = hugetlb_events_show; > > Any cleanup to __hugetlb_cgroup_file_dfl_init() and > __hugetlb_cgroup_file_legacy_init() that is possible would be great in a > follow-up patch :) > Will do! > Other than that, this looks very straight forward. > > Acked-by: David Rientjes