[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 6:49 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 06:28:25PM +0200, David Herrmann wrote: >> I'm not sure how to write a benchmark for this. I mean, I can easily >> craft one that causes the IDR to degenerate, but it requires us to >> keep huge numbers of files ope

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 5:25 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 05:14:51PM +0200, David Herrmann wrote: >> Hi >> >> On Mon, May 4, 2015 at 5:11 PM, Chris Wilson >> wrote: >> > On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote: >> >> Hi >> >> >> >> On Mon, May 4, 2

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread Chris Wilson
On Mon, May 04, 2015 at 06:28:25PM +0200, David Herrmann wrote: > I'm not sure how to write a benchmark for this. I mean, I can easily > craft one that causes the IDR to degenerate, but it requires us to > keep huge numbers of files open. > But this fact makes IDR rather suboptimal for cyclic alloc

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 5:11 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote: >> Hi >> >> On Mon, May 4, 2015 at 4:46 PM, Chris Wilson >> wrote: >> > On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote: >> >> The magic auth tokens we have a

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
Hi On Mon, May 4, 2015 at 4:46 PM, Chris Wilson wrote: > On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote: >> The magic auth tokens we have are a simple map from cyclic IDs to drm_file >> objects. Remove all the old bulk of code and replace it with a simple, >> direct IDR. >> >> Th

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread Chris Wilson
On Mon, May 04, 2015 at 05:14:51PM +0200, David Herrmann wrote: > Hi > > On Mon, May 4, 2015 at 5:11 PM, Chris Wilson > wrote: > > On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote: > >> Hi > >> > >> On Mon, May 4, 2015 at 4:46 PM, Chris Wilson > >> wrote: > >> > On Mon, May 04, 2

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread Chris Wilson
On Mon, May 04, 2015 at 05:02:37PM +0200, David Herrmann wrote: > Hi > > On Mon, May 4, 2015 at 4:46 PM, Chris Wilson > wrote: > > On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote: > >> The magic auth tokens we have are a simple map from cyclic IDs to drm_file > >> objects. Remove

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread David Herrmann
The magic auth tokens we have are a simple map from cyclic IDs to drm_file objects. Remove all the old bulk of code and replace it with a simple, direct IDR. The previous behavior is kept. Especially calling authmagic multiple times on the same magic results in EINVAL except on the first call. The

[PATCH 2/3] drm: simplify authentication management

2015-05-04 Thread Chris Wilson
On Mon, May 04, 2015 at 04:05:13PM +0200, David Herrmann wrote: > The magic auth tokens we have are a simple map from cyclic IDs to drm_file > objects. Remove all the old bulk of code and replace it with a simple, > direct IDR. > > The previous behavior is kept. Especially calling authmagic multip