Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3970031ybl; Mon, 9 Dec 2019 03:15:02 -0800 (PST) X-Google-Smtp-Source: APXvYqy5NnjlLPoUjyhhYok6VHo74fNXh4kCRfg/oVLeuUtViFfkFR9JfhNr9v7i7LDH8yw/sjMo X-Received: by 2002:a9d:588c:: with SMTP id x12mr20282563otg.2.1575890102573; Mon, 09 Dec 2019 03:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575890102; cv=none; d=google.com; s=arc-20160816; b=m7Nf0zz3zyuW9kLFDr6lvFtMnyRvKalbUb37gCUN+qIZq/MhwMA/vWoHYMnMgB8Nj2 E33POIw0/lw1s2X2txJ50y3f6EgLenMPQawhVIfSNpbkTckXIxMnp6yj0uOdGj/+TZzb yc6BnpHW31LzRSjzIsizbf4JnZRqebHxRLl1nlWBpziuzWdDZUBSDZWoVEyxHmtAtqMQ a3yb5bxr+6pM0nbG7fqoI3wb/ytGhw3rM4z7d8js7GhfirKbxworrKFPBmCToHxxWIhL ZiI11D5Voaw6SOQWvH0GLg2bAFY8PtxbY1HVKf94XvrQB9zjUdmHa98rKXg9HLjIpYWl /RSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=eOnmKT6eYkWpM/9RMSrOECqnWR9yQMFYs43XSqJTkqA=; b=lWVCWdRSFCz4OnqmFvLpH7BoMKYHQqh8r/SUGPadxS3zetR3LPfed+Q/1VHesN0s8a qK6PvThMbiRvSukcP+vONd4XQdT0pIQ1Uw5pUj+C5DmyyeElBVAWr+3Lr3n1GXjXQ+Q9 TDsNEql+HrcZiMaZn6RqYLmZQAbumnSNJTzYrv1UNrqJNjdHZgwp/DLzh69GWiEV1ORo 7X+PumaFOTxSdYWKTcRr9dKQvVsWAOmMhemY2mphgc/mqSEXsNlkGJZ8+feU7u5k909s PZgDcP8JNAeNK9EEy5rQ9E9zHe+h5XkF9NkLXOzScr80IpvHp0jFrlY6xkSELW7hQWEx qpLw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j70si11501744oib.219.2019.12.09.03.14.50; Mon, 09 Dec 2019 03:15:02 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727492AbfLIK3X (ORCPT + 99 others); Mon, 9 Dec 2019 05:29:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:57010 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727196AbfLIK3X (ORCPT ); Mon, 9 Dec 2019 05:29:23 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DCE12AD18; Mon, 9 Dec 2019 10:29:20 +0000 (UTC) Subject: Re: [PATCH v3 0/1] xen/blkback: Squeeze page pools if a memory pressure To: SeongJae Park Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, pdurrant@amazon.com, sj38.park@gmail.com, xen-devel@lists.xenproject.org References: <954f7beb-9d40-253e-260b-4750809bf808@suse.com> <20191209102347.17337-1-sjpark@amazon.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <7a1dfa22-1108-602f-68ff-ed30a18c1d3d@suse.com> Date: Mon, 9 Dec 2019 11:29:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191209102347.17337-1-sjpark@amazon.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.12.19 11:23, SeongJae Park wrote: > On Mon, 9 Dec 2019 10:39:02 +0100 Juergen wrote: > >> On 09.12.19 09:58, SeongJae Park wrote: >>> Each `blkif` has a free pages pool for the grant mapping. The size of >>> the pool starts from zero and be increased on demand while processing >>> the I/O requests. If current I/O requests handling is finished or 100 >>> milliseconds has passed since last I/O requests handling, it checks and >>> shrinks the pool to not exceed the size limit, `max_buffer_pages`. >>> >>> Therefore, `blkfront` running guests can cause a memory pressure in the >>> `blkback` running guest by attaching a large number of block devices and >>> inducing I/O. >> >> I'm having problems to understand how a guest can attach a large number >> of block devices without those having been configured by the host admin >> before. >> >> If those devices have been configured, dom0 should be ready for that >> number of devices, e.g. by having enough spare memory area for ballooned >> pages. > > As mentioned in the original message as below, administrators _can_ avoid this > problem, but finding the optimal configuration is hard, especially if the > number of the guests is large. > > System administrators can avoid such problematic situations by limiting > the maximum number of devices each guest can attach. However, finding > the optimal limit is not so easy. Improper set of the limit can > results in the memory pressure or a resource underutilization. This sounds as if the admin would set a device limit. But it is the other way round: The admin needs to configure each possible device with all parameters (e.g. backing dom0 resource) for enabling the frontend to use it. Juergen