Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4751683imm; Mon, 11 Jun 2018 18:46:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLd5gRDw9r1SCgkFqd0lT4DZ8Waz0VCGNc3y5kmt4yxsfsLrNawsZuyG8+ZeL2jIA5312U1 X-Received: by 2002:a62:e005:: with SMTP id f5-v6mr1652306pfh.88.1528768012588; Mon, 11 Jun 2018 18:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528768012; cv=none; d=google.com; s=arc-20160816; b=nqF0MThR3El6q5yDQzflwz0tNkGDN1u3n7tPrPPOukh3vqy6En4izKoqZC2qPD7/zB 9JvJ5BjycAlR8ZrPd9f67dNz5aEP96EVIWWCqUQVE6wld8Eo0JyG2W2iqz7gAu7oM+I+ UZJK4oOxRiKRAkLUBEkWUgkXfUNlG/dc2AvGqsSwCjDuW1iwi9U6kPYYewrO7VCZy47O 3ndY4EHLxJow+qMzJtk18lhg5856Ghqr0jZE/pX9wwaydUUoOcUHwNEZ+B4E7ERdXtuD mwyfOtjPnSDYX/svzQZgUdsKajxwZyvBakibW21iJdc2EAh4CdEeqXO71GQ1KFA8EXL1 YOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=A4jdVM0tZmkjekC5Erbtl+nZ5vGfM4x3y1c2+k9kz4c=; b=ZbZWSsP683BHRYnsOoqo/ShyJ7v64XEPzoeNIE+uprq2ug+RQh/PPP+2TNRNWmU2sD sMSdVcqh3vccAqClMtjl4qxSsV1g64xui/jU7hC6ngkUVvanvnAfOiHMu0i2g2s1pq6Z 76Gl8DkY5jaERSyJVCCLewNmU+84WEDyPfZ/ZncXK72C2QsFP1bi+0qT95b5E1bQtJWS QjCSQqX9ZGKoU2B+EyQ9EvBcXl7hZLsANJ9PxEzM4O3UsEaTMcRw2BJTyslRjWVwEkOY XltnBbzel4DaIC3K4c2RI2uNPhkbxK5Gw17lW/GRdPSZ6miRpYb+/7ldlvsfVq9Hic9O Fr1g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16-v6si25910678pgd.12.2018.06.11.18.46.38; Mon, 11 Jun 2018 18:46:52 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935304AbeFLBg7 (ORCPT + 99 others); Mon, 11 Jun 2018 21:36:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42336 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935027AbeFLBg4 (ORCPT ); Mon, 11 Jun 2018 21:36:56 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B17427D84D; Tue, 12 Jun 2018 01:36:55 +0000 (UTC) Received: from redhat.com (ovpn-120-248.rdu2.redhat.com [10.10.120.248]) by smtp.corp.redhat.com (Postfix) with SMTP id BD28A6B58E; Tue, 12 Jun 2018 01:36:54 +0000 (UTC) Date: Tue, 12 Jun 2018 04:36:54 +0300 From: "Michael S. Tsirkin" To: Linus Torvalds Cc: KVM list , virtualization , Network Development , Linux Kernel Mailing List , Andrew Morton , Bjorn Andersson , wei.w.wang@intel.com Subject: Re: [PULL] vhost: cleanups and fixes Message-ID: <20180612042600-mutt-send-email-mst@kernel.org> References: <20180611192353-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 12 Jun 2018 01:36:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 12 Jun 2018 01:36:55 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 11, 2018 at 11:44:05AM -0700, Linus Torvalds wrote: > On Mon, Jun 11, 2018 at 11:32 AM Linus Torvalds > wrote: > > > > So now we apparently do a GFP_KERNEL allocation insider the mm zone > > lock, which is broken on just _so_ many levels. > > Oh, I see the comment about how it doesn't actually do an allocation > at all because it's a single-entry. > > Still too damn ugly to live, and much too fragile. No way in hell do > we even _hint_ at a GFP_KERNEL when we're inside a context that can't > do any memory allocation at all. > > Plus I'm not convinced it's a "no allocation" path even despite that > comment, because it also does a "dma_map_page()" etc, which can cause > allocations to do the dma mapping thing afaik. No? Well no because DMA is triggered by the IOMMU flag and that is always off for the balloon. But I hear what you are saying about it being fragile. > Maybe there's some reason why that doesn't happen either, but > basically this whole callchain looks *way* to complicated to be used > under a core VM spinlock. > > Linus Maybe it will help to have GFP_NONE which will make any allocation fail if attempted. Linus, would this address your comment? -- MST