[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0EFE3365-1698-4BFB-B2F2-BEF1A2634E45@amazon.com>
Date: Thu, 21 Jan 2021 09:54:27 +0000
From: "Catangiu, Adrian Costin" <acatan@...zon.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"qemu-devel@...gnu.org" <qemu-devel@...gnu.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"Graf (AWS), Alexander" <graf@...zon.de>,
"arnd@...db.de" <arnd@...db.de>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
"rppt@...nel.org" <rppt@...nel.org>,
"0x7f454c46@...il.com" <0x7f454c46@...il.com>,
"borntraeger@...ibm.com" <borntraeger@...ibm.com>,
"Jason@...c4.com" <Jason@...c4.com>,
"jannh@...gle.com" <jannh@...gle.com>, "w@....eu" <w@....eu>,
"MacCarthaigh, Colm" <colmmacc@...zon.com>,
"luto@...nel.org" <luto@...nel.org>,
"tytso@....edu" <tytso@....edu>,
"ebiggers@...nel.org" <ebiggers@...nel.org>,
"Woodhouse, David" <dwmw@...zon.co.uk>,
"bonzini@....org" <bonzini@....org>,
"Singh, Balbir" <sblbir@...zon.com>,
"Weiss, Radu" <raduweis@...zon.com>,
"corbet@....net" <corbet@....net>,
"mst@...hat.com" <mst@...hat.com>,
"mhocko@...nel.org" <mhocko@...nel.org>,
"rafael@...nel.org" <rafael@...nel.org>,
"pavel@....cz" <pavel@....cz>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"areber@...hat.com" <areber@...hat.com>,
"ovzxemul@...il.com" <ovzxemul@...il.com>,
"avagin@...il.com" <avagin@...il.com>,
"ptikhomirov@...tuozzo.com" <ptikhomirov@...tuozzo.com>,
"gil@...l.com" <gil@...l.com>,
"asmehra@...hat.com" <asmehra@...hat.com>,
"dgunigun@...hat.com" <dgunigun@...hat.com>,
"vijaysun@...ibm.com" <vijaysun@...ibm.com>,
"oridgar@...il.com" <oridgar@...il.com>,
"ghammer@...hat.com" <ghammer@...hat.com>
Subject: Re: [PATCH v4 1/2] drivers/misc: sysgenid: add system generation id driver
On 12/01/2021, 15:07, "Greg KH" <gregkh@...uxfoundation.org> wrote:
On Tue, Jan 12, 2021 at 02:15:59PM +0200, Adrian Catangiu wrote:
> + Partial reads are not allowed - read buffer needs to be at least
> + ``sizeof(unsigned)`` in size.
"sizeof(unsigned)"? How about being specific and making this a real "X
bits big" value please.
"unsigned" does not work well across user/kernel boundries. Ok, that's
on understatement, the correct thing is "does not work at all".
Please be specific in your apis.
This is listed elsewhere also.
Right, will do!
> + - SYSGENID_GET_OUTDATED_WATCHERS: immediately returns the number of
> + *outdated* watchers - number of file descriptors that were open
> + during a system generation change, and which have not yet confirmed
> + the new generation counter.
But this number can instantly change after it is read, what good is it?
It should never be relied on, so why is this needed at all?
What can userspace do with this information?
That is true, a userspace process either has to wait for all to adjust to the new generation
or not care about other processes. Intermediate probing doesn't bring real value. Will remove.
thanks,
greg k-h
Thanks for the feedback!
Adrian.
Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
Powered by blists - more mailing lists