From: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
To: "Torvalds, Linus" <torvalds@linux-foundation.org>,
"nathan@kernel.org" <nathan@kernel.org>,
"Das, Nirmoy" <nirmoy.das@intel.com>,
"Auld, Matthew" <matthew.auld@intel.com>,
"thomas.hellstrom@linux.intel.com"
<thomas.hellstrom@linux.intel.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm fixes for 5.19-rc7
Date: Sun, 17 Jul 2022 18:48:11 +0000 [thread overview]
Message-ID: <67f51bb22eb9fd8e7fd7233027ab849e4ac83d68.camel@intel.com> (raw)
In-Reply-To: <CAHk-=wgcECb3cwnB=7Zgf8CBfEYaTWcSzAjfQpTM75_Q5aO7dA@mail.gmail.com>
On Sat, 2022-07-16 at 15:08 -0700, Linus Torvalds wrote:
> On Sat, Jul 16, 2022 at 2:35 PM Linus Torvalds
> <torvalds@linux-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
prev parent reply other threads:[~2022-07-17 18:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 3:36 Dave Airlie
2022-07-15 17:45 ` pr-tracker-bot
2022-07-15 21:09 ` Nathan Chancellor
2022-07-16 21:35 ` Linus Torvalds
2022-07-16 22:08 ` Linus Torvalds
2022-07-17 18:48 ` Vivi, Rodrigo [this message]
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=67f51bb22eb9fd8e7fd7233027ab849e4ac83d68.camel@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=nathan@kernel.org \
--cc=nirmoy.das@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®