From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (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 3AAEE1BFDEB for ; Thu, 10 Oct 2024 15:15:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728573336; cv=none; b=GlBQooTU3BnA5QKFsGyNiYzRUXQ6XLJsInRQhW32DV5Jel2C6LNEQKqhq8KAxtuv8TmfImRqXseuwOZk3d/5vPvSTHHIrvv4uURQ8LUeQE1f0KBil1aKwAIfnsrMQ1hp7RidK3JrAGqy9gWVFt0ORkO5ZIt/PgzIkcG+L96gHqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728573336; c=relaxed/simple; bh=dqv56F5p2mdifL8zO+qci9lkhNNOL4e99MU0MjciAkI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Mm+YLN1Zfw/a7X3zCPToqyrmXy8Vxlvqe+iiRTJ+O7vp2yZOPDwf2XYd8UJ66GCnyajowAo+roShHirYYHdVcNupASIjhaqPimA6jd19z8OTOWtrL2UxVmqEehZnt3dyN1sm7j+uo8kty/AZqmo/KIyKnG3Skeeys7DK2JY6lO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=T3Eofcci; arc=none smtp.client-ip=209.85.166.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="T3Eofcci" Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-3a3a03399fbso5928845ab.0 for ; Thu, 10 Oct 2024 08:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1728573333; x=1729178133; 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=VurnIyQe6BUgz/A+1slxdmxDT8lrNtE5+PtU4B5g+ZQ=; b=T3Eofcci82iRPGCp+cpMwEfTK2wNJXTdwDJITRotwMCdhEz/HbYb79caMVZQctMmOa SO4KW1+Iel5kuMMmNE0BXuapJKOg7e1dWgBr2AxbDWd3Vq+8U0lhgzY42o9hz0H3yAua swv/cgqv6D7HQ4y6UOyWVlVlAYPboNUCeU9baT1dcC50LSFYLeW+JA9GSo4Yq8Kz1XEq VFN2JTbDcnPXsPwvDrqs/mb9AJ9B0DV8xgJ29VeW+MSCe/zndP/eHjZJIthLt6puqTZL wF6GVKiKLW4t6CXAZYjWp1ewbvkmDN9ub19sI33DEEL9DSkewNw095iEGRa6/LmKISR4 sRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728573333; x=1729178133; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VurnIyQe6BUgz/A+1slxdmxDT8lrNtE5+PtU4B5g+ZQ=; b=uOyKFcPJ0cEekdagT44AMzZDeSjgWeuhP1KMoBOzxF6pVV8pRGcxoLodZzajXvVfAC lHPbKRZWyLZCdQGkSafUEYkBYwEC8Tky+KxXUng9uZl5Grs/EbeHGEALM7Lx4dMi2SQy nasq5e3tAdruiVco8osEuXLyetf5zewmj1bnxqRI6SJldooT7Qs1zcoX99CsLmZsZc50 twzAREbITILh9mP678UdWfhz8q+ymT6PdzRfcVKTBlxEolbfvrq44GeoOmKJaD8M0tJx RoDJJSyHeCqyPqbfXUhoo5+aURu2pIiT9a86fTD/a005iDMdvpFlXVcSKFenPjDeSsUk cvMg== X-Forwarded-Encrypted: i=1; AJvYcCWFy6yrurX8hxqbUSw4KUHQmnqQ3UqtvQMKKQgS3puZpqLojraUFUj41kTi2MAe9WuXqHZWd9A=@vger.kernel.org X-Gm-Message-State: AOJu0YxREpypDtBN3etotGtscsqOOwoHFwU2nRwBFxQtmblfGy7Tu34c 12wsQe0sITStL+bz4mkan+bmgk1HaTFT4wyoHQCOWEYE16McEa92JOqKZSfUt6U= X-Google-Smtp-Source: AGHT+IG4IRz9l2JEioTTHbM8YIFvgA0hLl48difILQmjUmIugOIvdPAFjxjO4kf/1OS5dYC9/nT4FQ== X-Received: by 2002:a05:6e02:58a:b0:3a3:a5c5:3915 with SMTP id e9e14a558f8ab-3a3a5c53af9mr33703855ab.16.1728573333169; Thu, 10 Oct 2024 08:15:33 -0700 (PDT) Received: from [192.168.1.116] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4dbada84a35sm279876173.117.2024.10.10.08.15.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Oct 2024 08:15:32 -0700 (PDT) Message-ID: Date: Thu, 10 Oct 2024 09:15:31 -0600 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 00/15] io_uring zero copy rx To: David Ahern , David Wei , io-uring@vger.kernel.org, netdev@vger.kernel.org Cc: Pavel Begunkov , Jakub Kicinski , Paolo Abeni , "David S. Miller" , Eric Dumazet , Jesper Dangaard Brouer , Mina Almasry References: <20241007221603.1703699-1-dw@davidwei.uk> <2e475d9f-8d39-43f4-adc5-501897c951a8@kernel.dk> <93036b67-018a-44fb-8d12-7328c58be3c4@kernel.org> <2144827e-ad7e-4cea-8e38-05fb310a85f5@kernel.dk> <3b2646d6-6d52-4479-b082-eb6264e8d6f7@kernel.org> <57391bd9-e56e-427c-9ff0-04cb49d2c6d8@kernel.dk> <7f8c6192-3652-4761-b2e3-8a4bddb71e29@kernel.dk> <8ec09781-5d6b-4d9b-b29d-a0698bcff5fe@kernel.org> Content-Language: en-US From: Jens Axboe In-Reply-To: <8ec09781-5d6b-4d9b-b29d-a0698bcff5fe@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/10/24 9:03 AM, David Ahern wrote: > On 10/10/24 8:21 AM, Jens Axboe wrote: >>> which adds zc send. I ran a quick test, and it does reduce cpu >>> utilization on the sender from 100% to 95%. I'll keep poking... >> >> Update on this - did more testing and the 100 -> 95 was a bit of a >> fluke, it's still maxed. So I added io_uring send and sendzc support to >> kperf, and I still saw the sendzc being maxed out sending at 100G rates >> with 100% cpu usage. >> >> Poked a bit, and the reason is that it's all memcpy() off >> skb_orphan_frags_rx() -> skb_copy_ubufs(). At this point I asked Pavel >> as that made no sense to me, and turns out the kernel thinks there's a >> tap on the device. Maybe there is, haven't looked at that yet, but I >> just killed the orphaning and tested again. >> >> This looks better, now I can get 100G line rate from a single thread >> using io_uring sendzc using only 30% of the single cpu/thread (including >> irq time). That is good news, as it unlocks being able to test > 100G as >> the sender is no longer the bottleneck. >> >> Tap side still a mystery, but it unblocked testing. I'll figure that >> part out separately. >> > > Thanks for the update. 30% cpu is more inline with my testing. > > For the "tap" you need to make sure no packet socket applications are > running -- e.g., lldpd is a typical open I have a seen in tests. Check > /proc/net/packet Here's what I see: sk RefCnt Type Proto Iface R Rmem User Inode 0000000078c66cbc 3 3 0003 2 1 0 0 112645 00000000558db352 3 3 0003 2 1 0 0 109578 00000000486837f4 3 3 0003 4 1 0 0 109580 00000000f7c6edd6 3 3 0003 4 1 0 0 22563 000000006ec0363c 3 3 0003 2 1 0 0 22565 0000000095e63bff 3 3 0003 5 1 0 0 22567 was just now poking at what could be causing this. This is a server box, nothing really is running on it... The nic in question is ifindex 2. -- Jens Axboe