Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Krzysztof Karas <krzysztof.karas@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	iommu@lists.linux.dev, "Andi Shyti" <andi.shyti@linux.intel.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Michał Grzelak" <michal.grzelak@intel.com>,
	"Janusz Krzysztofik" <janusz.krzysztofik@linux.intel.com>,
	"Sebastian Brzezinka" <sebastian.brzezinka@intel.com>,
	"Krzysztof Niemiec" <krzysztof.niemiec@intel.com>
Subject: Re: [PATCH v6 2/7] drm/i915/gem: Count mapped pages in a folio
Date: Fri, 11 Sep 2026 00:08:33 +0200	[thread overview]
Message-ID: <aqMpIkMBmnZWsckc@zenone.zhora.eu> (raw)
In-Reply-To: <20260902082525.1149367-3-krzysztof.karas@intel.com>

Hi Krzysztof,

> -		next_pfn = folio_pfn(folio) + nr_pages;
> +
> +		/*
> +		 * We assume folios are placed one after the other in memory
> +		 * and predict where the next folio begins.
> +		 */
> +		next_pfn = folio_pfn(folio) + folio_page_index + nr_pages;

referring to the comment, we are not really "assuming" anything
here; we are storing the next PFN so that continguous physcal
pages can be merged into the same SG entry.

Thanks,
Andi

  reply	other threads:[~2026-09-10 22:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  8:25 [PATCH v6 0/7] drivers: Improve memory management for large object allocations when i915/shmem is used with iommu Krzysztof Karas
2026-09-02  8:25 ` [PATCH v6 1/7] drm/i915/shmem: Validate max_segment Krzysztof Karas
2026-09-10 21:55   ` Andi Shyti
2026-09-11  6:22     ` Krzysztof Karas
2026-09-02  8:25 ` [PATCH v6 2/7] drm/i915/gem: Count mapped pages in a folio Krzysztof Karas
2026-09-10 22:08   ` Andi Shyti [this message]
2026-09-17  9:59   ` Janusz Krzysztofik
2026-09-02  8:25 ` [PATCH v6 3/7] drm/i915/gem: Free sg table on failure to acquire second folio Krzysztof Karas
2026-09-10 22:11   ` Andi Shyti
2026-09-02  8:25 ` [PATCH v6 4/7] iommu/dma: Catch scatterlist length overflows Krzysztof Karas
2026-09-10 22:21   ` Andi Shyti
2026-10-01 10:21     ` Krzysztof Karas
2026-09-10 22:25   ` Andi Shyti
2026-09-11  6:20     ` Krzysztof Karas
2026-09-02  8:25 ` [PATCH v6 5/7] drm/i915/gem: Pull out size validation into a separate function Krzysztof Karas
2026-09-10 22:27   ` Andi Shyti
2026-09-02  8:25 ` [PATCH v6 6/7] drm/i915/gem: Read and shrink memory in " Krzysztof Karas
2026-09-10 22:30   ` Andi Shyti
2026-09-11  6:18     ` Krzysztof Karas
2026-09-02  8:25 ` [PATCH v6 7/7] drm/i915/gem: Remove iterator and use while loop Krzysztof Karas
2026-09-10 22:33   ` Andi Shyti
2026-09-02  9:29 ` ✓ i915.CI.BAT: success for drivers: Improve memory management for large object allocations when i915/shmem is used with iommu Patchwork
2026-09-02 23:28 ` ✓ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqMpIkMBmnZWsckc@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=andi.shyti@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=iommu@lists.linux.dev \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=krzysztof.karas@intel.com \
    --cc=krzysztof.niemiec@intel.com \
    --cc=michal.grzelak@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=sebastian.brzezinka@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox