From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3D27335567 for ; Wed, 24 Dec 2025 16:43:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766594613; cv=none; b=kV/CsuDTegdJ3tURSYqN/1GcpyXNcDgUNc1MBH/qQ9hhvhTctz2A9iNdpZhcnFap7pXTj8z6i81BpXG3ATtwEVzWSHkVwLOOBRGTiaYGVzZrH063L2mFyUOGC80gCMZ7EhikADru4KEYYZ3U3Fu5pRlkfCU+TYi+xAeAanyaErk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766594613; c=relaxed/simple; bh=2khFtyxoG8D3pvttVzE9sVaw7e+CdusfWtieJ8Un1NM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hc5WJoCTIXl+ZOD9Mtn1qJAJdKwYBGfDb7VHm5Ay6CHBy/xKaJYxmDv0p4r1NlasjtSI9RY2w7qNbWNslLwv6Z8e8yfJu8Rq9VQK66T/xvbbaWAYQjYA9De6FZvuhXygohX0LJHYhjEYyCDjUkoytvqQCn78GnCMoLNlleUHoGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=F6Uiov8K; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F6Uiov8K" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-7bc248dc16aso4967791b3a.0 for ; Wed, 24 Dec 2025 08:43:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766594610; x=1767199410; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iwIk1nvhH1d/vdoQL7AOIOe4muNkhVEYe/P22V7V6vE=; b=F6Uiov8KrV1uXVywgYxGVViWHDKYBlDNCPFGcAghUuc/px803Mg7wNhjFsKRmB8/20 EiNKkGTMOQ1mVtnXRQREredIrr0309uYby6mwzTkpwzXydrh2+xo0XhwbgbWg5W2c+qQ bCJcwsVPh3uLFdHdvb92z6NvT3Hmb8v5htS8yIp6zw9+9GkpEQRBseNGX6tOunQhN54j QdXssaPvr21K8fp/YnqpRUxr98qGo8pgqM/QLIEWQ4bDtK9cJx2o1IwHPHhprC/G48in cr0MUtFRlFwucKPHW95VEEjVzsDhwfh82i+QCR2fWxK04NalXABOl0KnhpJ2EpbUQpwa TTfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766594610; x=1767199410; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iwIk1nvhH1d/vdoQL7AOIOe4muNkhVEYe/P22V7V6vE=; b=qhEkJ0R48SS51U+zigLDHHxHblu45qQA5T80IepC20YKm/vMQXEa0Qqr1yw9i0hhD1 WDIQbtjNTVi7SkT/VhXfA+7GDaDeMv/6TO7dnaE7x9LIKKLGC/EX3ivqLCVaL+1H/Xb3 r3rOf1KDJZA51pcSy+6loyltgqW005jgf/hqLw/uDKYxdiojC0uIsWB/pNhFb5bSo0+o novH+pRYgZWW2higGPqflV1rgRsHyanqtUbQnyMWbJBD8VVt/vtzRaR1iV3+PDsuIDGH rHV8Y3Rykm3GZCsTY15wKAvwyr2QFvZ4b1Cn2meZ/Q9XvHT9AQ+nWG5BceWFhPUDXXxo 43Yg== X-Forwarded-Encrypted: i=1; AJvYcCXVHirX7sqN86CXOLG0KZQWP5m/N0D3iHZy0uXnTgFuZoTbKg5t4lXyU13uw+1BIrMKlYhPYVTOtPlW6Ow=@vger.kernel.org X-Gm-Message-State: AOJu0YxR8vceP773gqxiwgaflXj19R+qLF8biYavJZKCyjtoo1v4s+CQ VfP9GmCicz7VOR/yeMreCcwzd5LdnFRq8H1iVOEIoEqqNY1rxf1CgIxO X-Gm-Gg: AY/fxX72EiB1MRZX2mb75QrozqhlDhgI65Y7FDleiW6Ffu1Ha2SNxdkOKBHL8CHGAP9 CPAkh0OrPXbf+bP1JEpnC9omhe6rCJUG0cJmzUAYwu/FTiy+K3OjvEIL6z9s1EcmTINx/aY5qQ2 8Rz0RPtgIAIj1Qw2dXNAHKJxdPj3e6fQd8ykYukNweJiGWJW2PQthO6G36Ljzc0cEN2nkVcBDTI OtHczCycSD+wXxGt21TuTDiDd8iOEzkRyuDn0KW/eI5SZMuI1vIonAbAye1BZCWlkJGyDDE8+WT CZaNbjRBJ2gW2wBLMD+3KFTR/HdQLUQd/Sfi82Hw86WQszIjpBJAt1sfthIlz7i53yAO98FswxJ 5mSgZH6QnP5/pb7/Uip4yKZ2ijBO9B7Htmrv8vA0JGcSQ40niwIsZvbD86cTnCcZw8sWAndte5n 09qyeRQfn12rmo3D0DbcUXzltaBxQK3hh8ukvZ6IsxcJgZnDPVfjoQRx8Rjg== X-Google-Smtp-Source: AGHT+IESvaaiYDz0FQXnk+cOSP0Y3BphqGxvFTMbynES490LRlFZ6uF+ljLMEtDR9jmc0Xu4izDLEA== X-Received: by 2002:a05:6a20:a107:b0:364:31e:2cb1 with SMTP id adf61e73a8af0-376a7af61c3mr17802942637.17.1766594609908; Wed, 24 Dec 2025 08:43:29 -0800 (PST) Received: from ?IPV6:2001:ee0:4f4c:210:c711:242:cd10:6c98? ([2001:ee0:4f4c:210:c711:242:cd10:6c98]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-34e70d4f7d3sm19211220a91.4.2025.12.24.08.43.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Dec 2025 08:43:29 -0800 (PST) Message-ID: <0c94aed3-bef9-4ae8-b9fa-bf2db113eee8@gmail.com> Date: Wed, 24 Dec 2025 23:43:21 +0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net 1/3] virtio-net: make refill work a per receive queue work To: Jason Wang Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" , Xuan Zhuo , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <20251223152533.24364-1-minhquangbui99@gmail.com> <20251223152533.24364-2-minhquangbui99@gmail.com> Content-Language: en-US From: Bui Quang Minh In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/24/25 07:52, Jason Wang wrote: > On Tue, Dec 23, 2025 at 11:27 PM Bui Quang Minh > wrote: >> Currently, the refill work is a global delayed work for all the receive >> queues. This commit makes the refill work a per receive queue so that we >> can manage them separately and avoid further mistakes. It also helps the >> successfully refilled queue avoid the napi_disable in the global delayed >> refill work like before. >> >> Signed-off-by: Bui Quang Minh >> --- > I may miss something but I think this patch is sufficient to fix the problem? > > Thanks > Yes, this fixes the reproducer in virtnet_rx_resume[_all] but the second patch also fixes a bug variant in virtnet_open. After the first patch, the enable_delayed_refill is still called before napi_enable. However, the only possible delayed refill schedule is in virtnet_set_queues and it can't happen between that window because during virtnet_rx_resume[_all], we still holds the rtnl_lock. So leaving the enable_delayed_refill before napi_enable does not cause an issue but it feels not correct to me. But moving enable_delayed_refill after napi_enable requires the new pending bool in the third patch. Thanks, Quang Minh.