Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1683601pxj; Wed, 19 May 2021 11:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8i0PQ7OjNrabcigzrsMHp6wqttQzEjXkhHWCnupm3c9RVAAvbQv4zvAAA8063Ye4ZH3WH X-Received: by 2002:a17:906:1185:: with SMTP id n5mr483411eja.342.1621448623074; Wed, 19 May 2021 11:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448623; cv=none; d=google.com; s=arc-20160816; b=SlSivnEVLlm9wC/NTPN2cR3oM41TKhFv6ZS7JJnlI9P9Y4SqdLbPzh5QgRY4wlsTWM JMdVsT0rdDs+7frZsP//qz5jAVS79kE/caXk+XUDjeEf9oNyU0TyeYvYmyPl+/iE+bL/ TEBTZptt73pR9HZp7WL15l3efac+0E6cgH8BOruQZv51qazQR9OpnJTCTXkTGjCsuP1i stDwtuPtJpNp1fc/Map/QfOsGFpiEYKF2jxfG0QOwcT/AK1BlNCSwZ78Fw7NyDFl62AJ gObRv0QnvULQdsu9lnm58sWAjZFkEgfKP+JrB7bTahaKdQtNOYqlRIrv4w9N6cfm18wp JUTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=5LMqI0lhO9Ys/kMfPgvFTZWjl7kX5k5QEuIhNJTDQZk=; b=bPoeJob+I1vkHgU+n0Z4bDK1tAmvimUw1HN/SVokc55z9tJmetJY1BGIu0LrfH6maw LzET+6Z3ahjwzDcTkoc62oUTE7YAQckzpzNJWZWH7N/CVpJJyaDV0R87ey44NS8xo0JB sh+mmmWV5l9vmVNuIET2mEi5MSlDQGeNkWTrvBOYJOfKtJBOn/5FNHjzkIpnuz+6vN6B 7DOtw7puqHHMYhaLakceEaHrzhKuzE2hoTolsUnOy1v71IWgNNP9McHSDMLjWJU8B1hO i4B6vs+4iZBIhxfBLQvyj3LQBpUsDkk3JOGDnAkBBYJ6plGSVbTPQKtTseS3po2Nf0Oz dKrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AAeZJeB+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si367480ejd.57.2021.05.19.11.23.18; Wed, 19 May 2021 11:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AAeZJeB+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350437AbhERPx5 (ORCPT + 99 others); Tue, 18 May 2021 11:53:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45867 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239415AbhERPx4 (ORCPT ); Tue, 18 May 2021 11:53:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621353156; 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=5LMqI0lhO9Ys/kMfPgvFTZWjl7kX5k5QEuIhNJTDQZk=; b=AAeZJeB+mprq2oIZncecf42w8wqan6uVC6sLgA9iyLPSgfUcnliWdaZMO4XlYEjsGvHlv+ Z8vts33FiIP6dMZFVKF0WkilLfToFxzdL1bkwcjL0ncxFpNtQVB94TBSd0eomXcW5sgIIi XOvWQZHlI2dQvV6+P5j9B48F482glX0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-190-gvOjpajKPpOq89gkACHbCw-1; Tue, 18 May 2021 11:52:34 -0400 X-MC-Unique: gvOjpajKPpOq89gkACHbCw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C931FCA4; Tue, 18 May 2021 15:52:33 +0000 (UTC) Received: from gondolin.fritz.box (ovpn-113-74.ams2.redhat.com [10.36.113.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14EB81001B2C; Tue, 18 May 2021 15:52:27 +0000 (UTC) Date: Tue, 18 May 2021 17:52:25 +0200 From: Cornelia Huck To: Christian Borntraeger Cc: Claudio Imbrenda , kvm@vger.kernel.org, frankja@linux.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, david@redhat.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 00/11] KVM: s390: pv: implement lazy destroy Message-ID: <20210518175225.32f61744.cohuck@redhat.com> In-Reply-To: <225fe3ec-f2e9-6c76-97e1-b252fe3326b3@de.ibm.com> References: <20210517200758.22593-1-imbrenda@linux.ibm.com> <20210518170537.58b32ffe.cohuck@redhat.com> <20210518173624.13d043e3@ibm-vm> <225fe3ec-f2e9-6c76-97e1-b252fe3326b3@de.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 May 2021 17:45:18 +0200 Christian Borntraeger wrote: > On 18.05.21 17:36, Claudio Imbrenda wrote: > > On Tue, 18 May 2021 17:05:37 +0200 > > Cornelia Huck wrote: > >> Can too many not-yet-cleaned-up pages lead to a (temporary) memory > >> exhaustion? > > > > in case of reboot, not much; the pages were in use are still in use > > after the reboot, and they can be swapped. > > > > in case of a shutdown, yes, because the pages are really taken aside > > and cleared/destroyed in background. they cannot be swapped. they are > > freed immediately as they are processed, to try to mitigate memory > > exhaustion scenarios. > > > > in the end, this patchseries is a tradeoff between speed and memory > > consumption. the memory needs to be cleared up at some point, and that > > requires time. > > > > in cases where this might be an issue, I introduced a new KVM flag to > > disable lazy destroy (patch 10) > > Maybe we could piggy-back on the OOM-kill notifier and then fall back to > synchronous freeing for some pages? Sounds like a good idea. If delayed cleanup is safe, you probably want to have the fast shutdown behaviour.