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=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 2B2D2C55ABD for ; Sun, 8 Nov 2020 11:23:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8246420702 for ; Sun, 8 Nov 2020 11:23:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RLF+li0H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8246420702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 934D16B0036; Sun, 8 Nov 2020 06:23:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E4BF6B005D; Sun, 8 Nov 2020 06:23:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 767486B0068; Sun, 8 Nov 2020 06:23:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id 478EB6B0036 for ; Sun, 8 Nov 2020 06:23:34 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D0B5D181AC9CB for ; Sun, 8 Nov 2020 11:23:33 +0000 (UTC) X-FDA: 77461015506.05.rub60_40063b1272e3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id BA5D218016BA5 for ; Sun, 8 Nov 2020 11:23:33 +0000 (UTC) X-HE-Tag: rub60_40063b1272e3 X-Filterd-Recvd-Size: 4762 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Nov 2020 11:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604834612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kK7wQQ53oSka40mp7QzYkAA57zy/9qtuGomTT4kIpYI=; b=RLF+li0H3hmlQnAxqtab+M9ObSV029z4rsfQ5QohNneX4uTiZjRJEfYYgpQjFgyMiAssqN rujx3PoII4E6faEEj23anvqu7H9JequDA8AED0ePd7xaG+rRrDII3MVr88i8ErdhE53kVi 9oFuMbbVpJ8VqRh0vvXg6SiESTu0UI0= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-500-9rxIUNG-MzmUvVluW_yi0A-1; Sun, 08 Nov 2020 06:23:30 -0500 X-MC-Unique: 9rxIUNG-MzmUvVluW_yi0A-1 Received: by mail-ed1-f72.google.com with SMTP id y8so1566479edj.5 for ; Sun, 08 Nov 2020 03:23:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kK7wQQ53oSka40mp7QzYkAA57zy/9qtuGomTT4kIpYI=; b=EL8NcLOSBhBj2mxslUZZtbqB+4M2lhtBxk6bQFXg6oegtd/HdOcSPvQD2E5miyDr96 TrdqksV9XjKQOoo2fxqj8IkBfzzP2ewUzi01WZS77frR/N5clwklL3zYKwjxFFT6uDGk aU8a6kifSmGF85xKKBCbKLpHnZJl4e5jPSM0Xje992Zo2WUcf3sHP0s3chGqG4WdxL+b D6uGuZNKt/E8phep2TfHatpDIp9M67cnqIm8rAY8E6bRrcVOYnBM69wAGJ+cjbaZ5mNs BvH+MPraqfoYokC35EoUjMCoCHS/bndckg6rL0NKZ9o5HgVctSk20iybUAhLaqRYnsVD +2jQ== X-Gm-Message-State: AOAM533g5m+XCF6sO3gP1xgh0oqGO5Qjg7I19XUHf0U7WNBcRy2gNSKm 6k0OJGq6w8hS0piYBd+uj2kJEbAjOczaJ8OEkBMZtfeTAHUI/QXa8N6EJhh8jg7fhmFNsYAecYP Ov4VrFq+ZIXY= X-Received: by 2002:a05:6402:3d9:: with SMTP id t25mr10598159edw.338.1604834609479; Sun, 08 Nov 2020 03:23:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+DAcudGnhBWkKul66N68aDAIJeVrpT00S+qFBU5inTk55z2YADV4bsEFbGYyF+z6bk2xYyQ== X-Received: by 2002:a05:6402:3d9:: with SMTP id t25mr10598144edw.338.1604834609191; Sun, 08 Nov 2020 03:23:29 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:73b1:3acc:3ebd:4fd4? ([2001:b07:6468:f312:73b1:3acc:3ebd:4fd4]) by smtp.gmail.com with ESMTPSA id l8sm5819902ejk.67.2020.11.08.03.23.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Nov 2020 03:23:28 -0800 (PST) Subject: Re: [PATCH] mm, kvm: account kvm_vcpu_mmap to kmemcg To: Roman Gushchin , Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20201106202923.2087414-1-shakeelb@google.com> <20201106205245.GB2285866@carbon.dhcp.thefacebook.com> From: Paolo Bonzini Message-ID: <67c2912d-e861-d660-61f0-912a72eff01d@redhat.com> Date: Sun, 8 Nov 2020 12:23:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201106205245.GB2285866@carbon.dhcp.thefacebook.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000014, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 06/11/20 21:52, Roman Gushchin wrote: > On Fri, Nov 06, 2020 at 12:29:23PM -0800, Shakeel Butt wrote: >> A VCPU of a VM can allocate couple of pages which can be mmap'ed by the >> user space application. At the moment this memory is not charged to the >> memcg of the VMM. On a large machine running large number of VMs or >> small number of VMs having large number of VCPUs, this unaccounted >> memory can be very significant. So, charge this memory to the memcg of >> the VMM. Please note that lifetime of these allocations corresponds to >> the lifetime of the VMM. >> >> Signed-off-by: Shakeel Butt >> --- > > Acked-by: Roman Gushchin > > Thanks, Shakeel! > Acked-by: Paolo Bonzini If this patch is not merged via -mm, please ping me again once its dependency is part of Linus's tree. Thanks, Paolo