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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 B7D2DC47420 for ; Tue, 22 Sep 2020 09:51:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B07D239A1 for ; Tue, 22 Sep 2020 09:51:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="kWC+smJj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B07D239A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8BE14900041; Tue, 22 Sep 2020 05:51:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 86DF9900036; Tue, 22 Sep 2020 05:51:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 75E28900041; Tue, 22 Sep 2020 05:51:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 5C21E900036 for ; Tue, 22 Sep 2020 05:51:40 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1E59D8249980 for ; Tue, 22 Sep 2020 09:51:40 +0000 (UTC) X-FDA: 77290230360.26.basin16_1e0fd422714c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id E5B991804B65A for ; Tue, 22 Sep 2020 09:51:39 +0000 (UTC) X-HE-Tag: basin16_1e0fd422714c X-Filterd-Recvd-Size: 4705 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Sep 2020 09:51:38 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id z22so21902019ejl.7 for ; Tue, 22 Sep 2020 02:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vLhN/ucVLfE69Dl/WKI0HEpcS5fMQFDATogS8fruK+Y=; b=kWC+smJjtT0c9St6jcuRKFe+iC/3MNGMO2hzLmI4h3ukWa//TYGeZk5SPv1bkUzYpe Piq5Gfchg23WCZ9wQAwQMGNwS3SbNdcaDAC2Az/+yjW8h+MjYeKt2dW1g/mome8M5EMI iHbdhnfc6dBx+c0BNKdqAlSk0ap/1jplkFecY= 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:content-transfer-encoding :in-reply-to:user-agent; bh=vLhN/ucVLfE69Dl/WKI0HEpcS5fMQFDATogS8fruK+Y=; b=palO5NP9oUx/fMY8MwNreqmmrZkwBwO+sQn7eq0sViwGs4yibkZWhbePYZGWL8yNGM l80p22twL3LOwJeq8fW/lJ+2WjUcZrM+YAJk/vPJ9D6/yyXbKdISGSIDvvO+2ktiF/PL uwp/MY2palDYq/UTqsgUn+Ns6X1ft0ultaiEt2/LPmKQMDC8z4OjhUL89ovWICqsYNRg yQBl+Dbx5L8n0/Ql3RCbByIGyWSrJc1zmUU6VUzvQT5rKgO71Dwxmj5IqLsDgTVxttzR sJUfyEbblWZQyqnBs3iyKhjLcOb74jCXRaIuyowfcv4qFOePnnFASjFCFDc2fX4CSSgS 9wMg== X-Gm-Message-State: AOAM532Blnkc6dyNP5wNyLX2jw7K5bq6L0CkSB9hgzTm+4bL62vZ2/Lu JQuc0A0v7759VOmVquqLQGGp5A== X-Google-Smtp-Source: ABdhPJz0OsMdgyayNctU/Uicxzh0FHbqFj8fYde2wyp0iYG7bitVMgqzdrly9+4XgRu7N/ARK6LFpw== X-Received: by 2002:a17:906:af53:: with SMTP id ly19mr3778973ejb.503.1600768297333; Tue, 22 Sep 2020 02:51:37 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:7783]) by smtp.gmail.com with ESMTPSA id y14sm10723374eje.10.2020.09.22.02.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 02:51:36 -0700 (PDT) Date: Tue, 22 Sep 2020 10:51:36 +0100 From: Chris Down To: Chunxin Zang Cc: Michal Hocko , Yafang Shao , Johannes Weiner , Vladimir Davydov , Andrew Morton , Tejun Heo , lizefan@huawei.com, Jonathan Corbet , Alexei Starovoitov , Daniel Borkmann , kafai@fb.com, Song Liu , Yonghong Song , andriin@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, Cgroups , linux-doc@vger.kernel.org, Linux MM , LKML , netdev , bpf@vger.kernel.org Subject: Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2 Message-ID: <20200922095136.GA9682@chrisdown.name> References: <20200921080255.15505-1-zangchunxin@bytedance.com> <20200921081200.GE12990@dhcp22.suse.cz> <20200921110505.GH12990@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.7 (2020-08-29) Content-Transfer-Encoding: quoted-printable 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: Chunxin Zang writes: >My usecase is that there are two types of services in one server. They >have difference >priorities. Type_A has the highest priority, we need to ensure it's >schedule latency=E3=80=81I/O >latency=E3=80=81memory enough. Type_B has the lowest priority, we expect= it >will not affect >Type_A when executed. >So Type_A could use memory without any limit. Type_B could use memory >only when the >memory is absolutely sufficient. But we cannot estimate how much >memory Type_B should >use. Because everything is dynamic. So we can't set Type_B's memory.high= . > >So we want to release the memory of Type_B when global memory is >insufficient in order >to ensure the quality of service of Type_A . In the past, we used the >'force_empty' interface >of cgroup v1. This sounds like a perfect use case for memory.low on Type_A, and it's pr= etty=20 much exactly what we invented it for. What's the problem with that?