From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 427462750E1 for ; Fri, 15 Aug 2025 10:23:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755253386; cv=none; b=HM79edUTie/v/+atQ1RniIPs+PdcEXlOGxJrsC/IaQ+4eTNdXcJhFE7nFa9HvgIkhlIFFh+w2LB+ELQyxw/sBflS2z6KsuJV35WEf73uZRlwOM5lv9tz0K05X3VsaL+CoyTGOcDbxxnygWypohwQMdi+Dq2om9oyEbZiWgeu0ZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755253386; c=relaxed/simple; bh=WE1rN9CQDbCOvNfVAG7gWcd5KU32gMMFHCTSQAiwbWE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IDMHmqA/07QPIqNZF7hcyFqKdmTgFeIdPmTeDFERjtZvavUGH+o9rUtbruccJmAZ41mV13aZ//JQrYYpF2le4/vxt9TiDd1Q2tWFjRyo/XrYxN4v2KadIFYCKG5QF/S8ocEYcNhCz5z7vUsjC5CfaIrVU3VRBMlUhbqtBu3aEbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ieKanSU3; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ieKanSU3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755253383; 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: in-reply-to:in-reply-to:references:references; bh=mXZQB1LE0AtxSpGbCGCAth6SRq5k5i0cLzQs1mJzr8w=; b=ieKanSU3UdiYuMj+T5TZDX/Cp46ICWPqbsLytf5ZcDkwa2+3xZ/w3K3Hv4lAKNXw28wS8Y v+V7R59JwkLAfq+N/F4bx2+LXQBIh0VTENMDoTUCwDCDeNQJbrnIk3EttBoHOO0qNRnBG9 Ok1PCBN5FUNTyrCsypBh9SvuThzX5gQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-475-Jx-dtvXSM3mylbrN1SueqQ-1; Fri, 15 Aug 2025 06:23:01 -0400 X-MC-Unique: Jx-dtvXSM3mylbrN1SueqQ-1 X-Mimecast-MFC-AGG-ID: Jx-dtvXSM3mylbrN1SueqQ_1755253381 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3b9d41b779aso1051254f8f.0 for ; Fri, 15 Aug 2025 03:23:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755253380; x=1755858180; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mXZQB1LE0AtxSpGbCGCAth6SRq5k5i0cLzQs1mJzr8w=; b=Ei0tKhUebHo2RD8Q4HKJhppQ7Z9dP4Eux3fbAHuZgi58yk9TEFwh1pzxhuR4cfeBER o1lQdkcZPUrbW9vxy22Lii652bwCdpZZzpd+nTxn7fLkOlPEwll5WOyRwU6xDQE8Kvhe mP2hRBzN1Kp4I2pC2C1q2Cwy7NWSPr9mwMJrVtXXgCy5TPmdMjzD8HbCZCl/PQUkMccL zBlw1AgxOow3bglMGxFTwjn91rREr3ft2oDfWWssNYQ7hQDfa1sdQFoo+dcOm8tSMXXS XD5iUj6XkEgZH9+WlgCZFmlnDm8Zv/Aea68eF8k4S5B3exePK84GiVvJ2W7c+E7Qn7HI w0Qg== X-Forwarded-Encrypted: i=1; AJvYcCV57fBK7UbaBjLR8cq1eJqyPVbbKNgbwatFS69ddjvtM6kQQSR8Ivk1Kpnyu4xStlQAPXXg6AsFnXrrHm0=@vger.kernel.org X-Gm-Message-State: AOJu0YzXIznR3BgWEuOkosemFrSrZ7TqT+rslrZqVOks9MriLAfEmUjI xUm1dGSvTSECKKoSJJMjmdl0SuPXFm8xG0jh2Wj10WKlHThdyHqsShAv5iL7Qo3vOcIx9JWuScO 6QkkRlF8pSZfP12XiM9PoGzBlDAYtj+xaN/y2dta0bTNlkZQwIQsaUieZD2kHt5/NWQ== X-Gm-Gg: ASbGnctl002Oj4Z1Ib0ThHBd8xJqd0Zt4McvOZt47qoCG3ac1BSChG5GvgKJ7hq3AVV 2e/2b2seLKuouCAhgzFBHyjwKz3Vo6CwwU3KJ2tFgXeJBvcS9OpdESxIQMJ/fN7PwfnkTXiuCb0 MaB0KIDPugFq26lOeiuJx2w/IQpjAqnxtaD679RdThfVvqQnV2V+Scj+hXC/9OWt6n0ObgEUOmm 70j6TUOBpvrpkom2mEj4zvZyU/jtisvi3lxKmztsznhmfBOU+gZmIlGhG7w0pDNJ2l6rmOw95gc hii0b0UrrNDJ3vjKcxfSGsMuNd/jf3hiARo= X-Received: by 2002:a05:6000:26c3:b0:3b8:d08c:cde5 with SMTP id ffacd0b85a97d-3bb68fdd70bmr936462f8f.43.1755253380602; Fri, 15 Aug 2025 03:23:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXcWSGeWgeyeaq8Y6Kdy9hPI87jT5jAViHEaJ65V0tcueR2T7DgVvat00CErWZfwSwgGPjEA== X-Received: by 2002:a05:6000:26c3:b0:3b8:d08c:cde5 with SMTP id ffacd0b85a97d-3bb68fdd70bmr936446f8f.43.1755253380209; Fri, 15 Aug 2025 03:23:00 -0700 (PDT) Received: from redhat.com ([2a06:c701:73cf:b700:6c5c:d9e7:553f:9f71]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a223197fbsm14231915e9.8.2025.08.15.03.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Aug 2025 03:22:59 -0700 (PDT) Date: Fri, 15 Aug 2025 06:22:56 -0400 From: "Michael S. Tsirkin" To: Hillf Danton Cc: Will Deacon , linux-kernel@vger.kernel.org, Stefano Garzarella , Jason Wang , netdev@vger.kernel.org, virtualization@lists.linux.dev Subject: Re: [PATCH v4 9/9] vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers Message-ID: <20250815062222-mutt-send-email-mst@kernel.org> References: <20250717090116.11987-1-will@kernel.org> <20250717090116.11987-10-will@kernel.org> <20250813132554.4508-1-hdanton@sina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250813132554.4508-1-hdanton@sina.com> On Wed, Aug 13, 2025 at 09:25:53PM +0800, Hillf Danton wrote: > On Wed, 13 Aug 2025 04:41:09 -0400 "Michael S. Tsirkin" wrote: > > On Thu, Jul 17, 2025 at 10:01:16AM +0100, Will Deacon wrote: > > > When transmitting a vsock packet, virtio_transport_send_pkt_info() calls > > > virtio_transport_alloc_linear_skb() to allocate and fill SKBs with the > > > transmit data. Unfortunately, these are always linear allocations and > > > can therefore result in significant pressure on kmalloc() considering > > > that the maximum packet size (VIRTIO_VSOCK_MAX_PKT_BUF_SIZE + > > > VIRTIO_VSOCK_SKB_HEADROOM) is a little over 64KiB, resulting in a 128KiB > > > allocation for each packet. > > > > > > Rework the vsock SKB allocation so that, for sizes with page order > > > greater than PAGE_ALLOC_COSTLY_ORDER, a nonlinear SKB is allocated > > > instead with the packet header in the SKB and the transmit data in the > > > fragments. Note that this affects both the vhost and virtio transports. > > > > > > Reviewed-by: Stefano Garzarella > > > Signed-off-by: Will Deacon > > > > So this caused a regression, see syzbot report: > > > > https://lore.kernel.org/all/689a3d92.050a0220.7f033.00ff.GAE@google.com > > > > I'm inclined to revert unless we have a fix quickly. > > > Because recomputing skb len survived the syzbot test [1], Will looks innocent. > > [1] https://lore.kernel.org/lkml/689c8d08.050a0220.7f033.014a.GAE@google.com/ I'm not sure I follow that patch though. Do you mind submitting with an explanation in the commit log? -- MST