From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 9A6B23307B for ; Fri, 15 Nov 2024 01:59:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731635957; cv=none; b=u7f1ZlA7UWEs/sfDaR3I87Be9lGtHrP7uLXqzJnV9bo78+L+dV6reRJywAFAwX43QbFR2FgtVzqhGETySgIhPRlQmSH6Gj5M5ENKNN7ggLjoGxUIJvpP6kqJcLGaBWslcJrsnW57cAyCc88wsue+LzxUbB3cTGGt+NMDMw9tWzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731635957; c=relaxed/simple; bh=9dskGBysdln+lYQVGRohOKlI/bgLYL0kJNpAhLRteA4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nY8vQV4J/rUxydCMeDQNZwG6Kkz+keM65sjkMq66PxVG6ssy67cn8wo/Tpb9ft7VH92ip8cgyuNuBUApHjiSA1ABy7imBE0bVeRvBLPfp93D6Km9ry1oSgf7AG7+UzmrOM2YkaSG+5RdIh9rOtvJ1Z3m9p8hMi6m4SVLGn3RymM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=NlkUy8vl; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="NlkUy8vl" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-46353bd879aso1678721cf.3 for ; Thu, 14 Nov 2024 17:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1731635954; x=1732240754; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Hm3KvGlpNbi42Zh2FXESOlpQoGT8BcmT00IYzj/PJNs=; b=NlkUy8vlVVYq711xx66haWi+y24Dj5tQGU7+iMqzcvkib3MZqoUuD6n7JDjzVPW/8a KfBl+LREFQ+/WVrLscJeN8hOKykW2T8rn7WqhNuafz6WmN4yLO3oGFFaZrDPiv+x39Ax uaXlqYHTNHaPEiE3C3XJMpkZJKx5vUKyuvhucedMX1lmOH2gZNcRI96BJ57a5UaksPQy q1JOpmIUL5+Y7ijKuRFbjXSQnElONvXO7S90kFjjf39qHNFc43Rkq/phITEEWa+MR2He u/HqxrAbkWlzICssz2oPA4rXF5yUsqIv/8VtE7+eynS30AfjLNvRtJHW1pKqbO3v1Pzl WQlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731635954; x=1732240754; 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=Hm3KvGlpNbi42Zh2FXESOlpQoGT8BcmT00IYzj/PJNs=; b=hfI/BgwhHSaKtmmuO8XR6/ZUl14Z03d9rXy/M0ZJ7AhCcLm3/tazEoGy0rnxEK58zG s2tQfOV1hlEF/oB7nBO4ez6St9PmUZWSyYhWDjIfXqUbOV/0SzTNDutlA8nxMQPJQ+1H ttCWg4OrceVPvbNYBdptVGqw5nchw81t3UCciseN95/b0iNqf3YnK9jfBKM+8eklgy2G Fijku0Qz/EYLw8AdyHZpjwc/SG8/NcRi+fee1qxk3hUb7s+kL4DO3Z6JPkWC6cSp0eF2 coT+0zeHl8cJwMrtIorhcjYp0QkuMyskT4bTVT6zLMivTHJ+Ya8R59uYDbzldQs5feHN FojQ== X-Forwarded-Encrypted: i=1; AJvYcCUVuDbBs7Q3nBsBoP/BGqYbgJH+2McOVygZtHDYQAu+xqa6VAJJj3RgpAuEBJ6LXCnCgdm0pQxM2JFdmV8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2nfDIdi5frUi8hMni+8+4B8bSgLHCm4Xm3qGRXRa1LNnzuDfA U0lMM3wO3C2HG+I3pc88ngUnS2YeW2UCRBQAKLJtfi9CABIlioChVT4ipOTuIWo= X-Google-Smtp-Source: AGHT+IF+aeMqV2rKAuv61HduvUq1HkREkex7cEjAy7nPtVPfuS68jcRhASn6Dsq8GkYqaHel7bXwwA== X-Received: by 2002:a05:622a:58cc:b0:463:1577:2416 with SMTP id d75a77b69052e-46363e2e5b7mr16159931cf.32.1731635954588; Thu, 14 Nov 2024 17:59:14 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-128-5.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.128.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4635a9e97f4sm13129521cf.22.2024.11.14.17.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 17:59:13 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1tBlc8-00000002LdN-1jZw; Thu, 14 Nov 2024 21:59:12 -0400 Date: Thu, 14 Nov 2024 21:59:12 -0400 From: Jason Gunthorpe To: Mina Almasry Cc: netdev@vger.kernel.org, Jakub Kicinski , Pavel Begunkov , Willem de Bruijn , Kaiyuan Zhang , Samiullah Khawaja , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Jesper Dangaard Brouer , Ilias Apalodimas Subject: Re: [PATCH net-next v2 4/5] page_pool: disable sync for cpu for dmabuf memory provider Message-ID: <20241115015912.GA559636@ziepe.ca> References: <20241107212309.3097362-1-almasrymina@google.com> <20241107212309.3097362-5-almasrymina@google.com> <20241108141812.GL35848@ziepe.ca> 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: On Fri, Nov 08, 2024 at 11:01:21AM -0800, Mina Almasry wrote: > > If you do this you may want to block accepting dmabufs that have CPU > > pages inside them. > > > > How do I check if the dmabuf has CPU pages inside of it? The only way > I can think to do that is to sg_page a scatterlist entry, then > !is_zone_device_page() the page. Or something like that, but I thought > calling sg_page() on the dmabuf scatterlist was banned now. I don't know. Many dmabuf scenarios abuse scatter list and the CPU list is invalid, so you can't reference sg_page(). I think you'd need to discuss with the dmabuf maintainers. Jason