Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2004062ybg; Fri, 5 Jun 2020 03:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUlXBB/GcmoSjOFFR1oyfviNDVRV9Ao4kuAOhM14nNZklgQ3cdRE6k1rDfvPAS8zgnEiVl X-Received: by 2002:a17:906:ecef:: with SMTP id qt15mr7726052ejb.91.1591351713157; Fri, 05 Jun 2020 03:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591351713; cv=none; d=google.com; s=arc-20160816; b=VI99xghfBVedlrQ6NmjcTdZc+Gke6HiZqIUkD8t3NEBoiDW4Ue3JAV92PRv8AhcMju ANqrQ8wpfLhm9O2Jl4eNfe15Ek2hHSpJRrgbDLyVNHJNqo+N6HC0LF1VNx0Mcr1ryOQ2 BVhFm2+9ARTOPHWqFXiVchdDGRWq4jXpG9do6ug2Vb2hgWJh3Kdb4pU/x36L0T1dmKzE 6lbE/Vs53x1Uc4sBJ4JtysdK7W0ZjpQotjMZ4FcSHa2B9vLxL5niD53D2RXE7uLkAkpt 8SObsHUabofbjjzQZQyUJXZqgLzLCTR2PfHV2MKZuxgLc5dP6swJnY6HSf35Jzy7XarI 1Rag== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=69/IgJzfHYKKLpGhUCF/I9QRFjd16n0BqYjQyusrjI0=; b=VLW5au4SaonXtg9OFaQcvz6+L6lvpNUk8QZu2s+T+p8rn4qZK+spHfd09KnJsnAZsu f1IBx2PHT2qJ8m4HzlglURChpHMYQ1FOjglkSaIP49UeAKpX2HQnyF1FI+QkAcUiIWF+ jpINfXNSY+njtyOm25r05Un9VvX7LtsRoWnFU0YbYnGmEJj/FNrEAS8hiw8xrYCdoMcj OXKVfj1ptBy3apkx2rAjfXeQR2R/++Eh3Fz10x+U6YH2OYrDZGO/lwbBxL46+D1MUjFK cymnbCZQtgTWAnifpwehsMcP4E8ZcqzpUiHEZaEBbE8xccBk5w2fBnnNKa4D5NFUdRAp uYoA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si3008785ejb.595.2020.06.05.03.08.10; Fri, 05 Jun 2020 03:08:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726462AbgFEKGU (ORCPT + 99 others); Fri, 5 Jun 2020 06:06:20 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:56292 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbgFEKGU (ORCPT ); Fri, 5 Jun 2020 06:06:20 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=39;SR=0;TI=SMTPD_---0U-djnUn_1591351570; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U-djnUn_1591351570) by smtp.aliyun-inc.com(127.0.0.1); Fri, 05 Jun 2020 18:06:11 +0800 Subject: Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Michal Hocko , Andrew Morton , "Michael S . Tsirkin" , Sebastien Boeuf , Samuel Ortiz , Robert Bradford , Luiz Capitulino , Alexander Duyck , Alexander Potapenko , Alexander Viro , Anshuman Khandual , Anthony Yznaga , Dan Williams , Dave Young , Igor Mammedov , Jason Wang , Johannes Weiner , Juergen Gross , Konrad Rzeszutek Wilk , Len Brown , Mel Gorman , Michal Hocko , Mike Rapoport , Oscar Salvador , Oscar Salvador , Pavel Tatashin , Pavel Tatashin , Pingfan Liu , Qian Cai , "Rafael J. Wysocki" , Stefan Hajnoczi , Vlastimil Babka , Wei Yang References: <20191212171137.13872-1-david@redhat.com> <9acc5d04-c8e9-ef53-85e4-709030997ca6@redhat.com> <1cfa9edb-47ea-1495-4e28-4cf391eab44c@linux.alibaba.com> From: Alex Shi Message-ID: Date: Fri, 5 Jun 2020 18:06:10 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/6/5 下午5:08, David Hildenbrand 写道: > Please use the virtio-mem-v4 branch for now, v5 is still under > construction (and might be scrapped completely if v4 goes upstream as is). > > Looks like a DMA issue. Your're hotplugging 1GB, which should not really > eat too much memory. There was a similar issue reported by Hui in [1], > which boiled down to wrong usage of the swiotlb parameter. I have no swiotbl=noforce set, and sometime no swiotlb error reported, like (qemu) [ 41.591308] e1000 0000:00:03.0: dma_direct_map_page: overflow 0x000000011fd470da+54 of device mask ffffffff [ 41.592431] e1000 0000:00:03.0: TX DMA map failed [ 41.593031] e1000 0000:00:03.0: dma_direct_map_page: overflow 0x000000011fd474da+54 of device mask ffffff ... [ 63.049464] ata_piix 0000:00:01.1: dma_direct_map_sg: overflow 0x0000000107db2000+4096 of device mask ffffffff [ 63.068297] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [ 63.069057] ata1.00: failed command: READ DMA [ 63.069580] ata1.00: cmd c8/00:20:40:bd:d2/00:00:00:00:00/e0 tag 0 dma 16384 in [ 63.069580] res 50/00:00:3f:30:80/00:00:00:00:00/a0 Emask 0x40 (internal error) > > In such cases you should always try to reproduce with hotplug of a > sam-sized DIMM. E.g., hotplugging a 1GB DIMM should result in the same > issue. > > What does your .config specify for CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE? Yes, it's set. I had tried the v2/v4 version, which has the same issue. Is this related with virtio-mem start address too low? Thanks a lot! > > I'll try to reproduce with v4 briefly. > > [1] > https://lkml.kernel.org/r/9708F43A-9BD2-4377-8EE8-7FB1D95C6F69@linux.alibaba.com