Re: [PATCH 4/7] drm/i915: Check PIN_NONFAULT overlaps in evict_for_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Joonas Lahtinen (2017-10-09 13:17:24)
> On Mon, 2017-10-09 at 09:43 +0100, Chris Wilson wrote:
> > If the caller says that he doesn't want to evict any other faulting
> > vma, honour that flag. The logic was used in evict_something, but not
> > the more specific evict_for_node, now being used as a preliminary probe
> > since commit 606fec956c0e ("drm/i915: Prefer random replacement before
> > eviction search").
> > 
> > Fixes: 606fec956c0e ("drm/i915: Prefer random replacement before eviction search")
> > Fixes: 821188778b9b ("drm/i915: Choose not to evict faultable objects from the GGTT")
> > References: https://patchwork.freedesktop.org/patch/174781/
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> 
> Could have merged with the previous test, too?

Yes, it could have been. I tend to favour verbosity in if(), the
compiler will merge identical jmps (or at least should), but a long
branching expression combining & and &&, or !, | or || I think is harder
to read than separate if()s. Then when inspired it becomes easler to
add comments before each branch. The counter argument would be is the
expressions were logically connected (when almost by definition they
need to be in the same logical expression :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux