Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5114198ybl; Tue, 10 Dec 2019 00:18:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwEEzFcU6H2kEOFoKkXorDG081TVwO0RS8il502twZPtMDeevj8t2oYiaBwsj1rn4mWHJtv X-Received: by 2002:aca:cd92:: with SMTP id d140mr2885941oig.68.1575965902001; Tue, 10 Dec 2019 00:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575965901; cv=none; d=google.com; s=arc-20160816; b=uhyJrUCUsrFKpS0Szlxd1KY/qtEYxqNIieSpfaLmkYUGnB8a8prlxjHEim9dVcGWOG pzQtCvqz2d6zMBuzrCd7tAmKGDIweOPntavspmMc45gmjW4S/iY5NaLeEYdLE1lqmL31 WLq3DBAesZUvFoJ2Zfju7QD+kqJHyG4rOc3YGWDYZF81ZagEhFBgYhvr7mckVSB3n0o1 pyj53vRYWtkudvdHkAP9iZMQCkySOsvpJlwibOR8jaN90/s8CVchBJPGzTvcwn1/hyZf B9aTzoukkCFv15Rf1HbYAvvMUIC1qSGQiiUaFSDgmMakGrweW9VgvUkiQYOb7nnjQ9oz wPRA== 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=iZgcOINadJIpAATWP9ye+vct5xSYZMWbF/2N8wjLm6Y=; b=lg0LDejXOJnuzqD5TnoehndrTuda3Mn3RPycc2xk0t3QSaY5hC5PCUHjJjwn5VIf/3 od9Qq6nfBmQ4IIE51vt5eyoo6G/4kyNEqgbqcjBI54DlyFAMXzLNxEyi250hkt232ezA AhSDkozpYndtSamJoWOszR3udF7JrqmbfN6urfq4f3GGJlq5t86xG+bxbZwt8QuQywiG 7fLQVc3awbLZLl/m+NI7V4OGE5HYLrYx/F4StuJ60hQw+75VlElAhTI9HlV5oTn4Nfz1 e6Kd7YCqTKbXeQ4tt1rRF9FqzM1Jum3Im9fe8RBMNMc7crhqVj2iZ3jeVWSrErDAQD34 CA6w== 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 l16si1541003otr.106.2019.12.10.00.18.09; Tue, 10 Dec 2019 00:18:21 -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 S1727154AbfLJIRl (ORCPT + 99 others); Tue, 10 Dec 2019 03:17:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:38224 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727048AbfLJIRl (ORCPT ); Tue, 10 Dec 2019 03:17:41 -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 9CC40B321; Tue, 10 Dec 2019 08:17:39 +0000 (UTC) Subject: Re: [PATCH v5 1/2] xenbus/backend: Add memory pressure handler callback To: SeongJae Park , sjpark@amazon.com Cc: axboe@kernel.dk, konrad.wilk@oracle.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, pdurrant@amazon.com, roger.pau@citrix.com, xen-devel@lists.xenproject.org, SeongJae Park References: <20191210080628.5264-1-sjpark@amazon.de> <20191210080628.5264-2-sjpark@amazon.de> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <7260cdce-7488-5045-0572-021a0ef191ac@suse.com> Date: Tue, 10 Dec 2019 09:17:38 +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: <20191210080628.5264-2-sjpark@amazon.de> 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 10.12.19 09:06, SeongJae Park wrote: > Granting pages consumes backend system memory. In systems configured > with insufficient spare memory for those pages, it can cause a memory > pressure situation. However, finding the optimal amount of the spare > memory is challenging for large systems having dynamic resource > utilization patterns. Also, such a static configuration might lack a > flexibility. > > To mitigate such problems, this commit adds a memory reclaim callback to > 'xenbus_driver'. Using this facility, 'xenbus' would be able to monitor > a memory pressure and request specific devices of specific backend > drivers which causing the given pressure to voluntarily release its > memory. > > That said, this commit simply requests every callback registered driver > to release its memory for every domain, rather than issueing the > requests to the drivers and the domain in charge. Such things will be > done in a futur. Also, this commit focuses on memory only. However, it > would be ablt to be extended for general resources. > > Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Juergen