[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <67f51bb22eb9fd8e7fd7233027ab849e4ac83d68.camel@intel.com>
Date: Sun, 17 Jul 2022 18:48:11 +0000
From: "Vivi, Rodrigo" <rodrigo.vivi@...el.com>
To: "Torvalds, Linus" <torvalds@...ux-foundation.org>,
"nathan@...nel.org" <nathan@...nel.org>,
"Das, Nirmoy" <nirmoy.das@...el.com>,
"Auld, Matthew" <matthew.auld@...el.com>,
"thomas.hellstrom@...ux.intel.com" <thomas.hellstrom@...ux.intel.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"daniel.vetter@...ll.ch" <daniel.vetter@...ll.ch>,
"airlied@...il.com" <airlied@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [git pull] drm fixes for 5.19-rc7
On Sat, 2022-07-16 at 15:08 -0700, Linus Torvalds wrote:
> On Sat, Jul 16, 2022 at 2:35 PM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > That said, even those type simplifications do not fix the
> > fundamental
> > issue. That "DIV_ROUND_UP()" still ends up being a 64-bit divide,
> > although now it's at least a "64-by-32" bit divide.
>
> Hmm. The "DIV_ROUND_UP()" issue could be solved by just making the
> rule be that the max_segment size is always a power of two.
>
> Then you don't need the (expensive!) DIV_ROUND_UP(), and can just use
> the regular "round_up()" that works on powers-of-two.
>
> And the simplest way to do that is to just make "max_segments" be
> 2GB.
>
> The whole "round_down(UINT_MAX, page_alignment)" seems entirely
> pointless. Do you really want segments that are some odd number just
> under the 4GB mark, and force expensive divides?
I fully agree with you that if we have only things at 32bit we could
use the round up and avoid the division.
>
> For consistency, I used the same value in
> i915_rsgt_from_buddy_resource(). I have no idea if that makes sense.
>
> Anyway, the attached patch is COMPLETELY UNTESTED. But it at least
> seems to compile. Maybe.
Thanks. We should check this.
Meanwhile I'd like to say that the team had worked already to fix the
horrible 32 vs 64 bits inconsistency and the build breakage already.
The fix [1] was merged Jul 13.
[1] https://patchwork.freedesktop.org/patch/493637/?series=106260&rev=1
I'm the one to blame for not having
propagated this along with the latest drm-intel-fixes round.
Please accept my apologies.
I will check right now why this was missed on my side and check how to
propagate quickly.
Sorry,
Rodrigo.
>
> Linus
Powered by blists - more mailing lists