Re: [PATCH 2/3] drm/file: Uncompact the feature flags

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

 



Quoting Daniel Vetter (2018-11-02 13:25:42)
> This essentially undoes
> 
> commit 39868bd7668bd47308b1dfd97c212757caee764f
> Author: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Date:   Tue Oct 29 08:55:58 2013 +0000
> 
>     drm: Compact booleans within struct drm_file
> 
> We do lockless access to these flags everywhere, and it's kinda not a
> great idea to mix lockless and bitfields. Aside from that gcc isn't
> generating great code for these.
> 
> If this ever becomes an issue size-wise, I think we need atomic_t here
> and atomic bitflag ops.

(you don't need atomic_t to use atomic bitflag ops, more so since the
bit ops work on unsigned long!)

> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: David Herrmann <dh.herrmann@xxxxxxxxx>
> Cc: Dave Airlie <airlied@xxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

A bit of a nuisance since bools are not well specified in terms of
alignment and size, so the growth is as bad as you would expect, and if
atomic access to these individual members was strictly required we
would already be up the proverbial creek.

Acked-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux