[PATCH trivial 7/7] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL

Michael Tokarev posted 7 patches 3 weeks, 6 days ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>
There is a newer version of this series
[PATCH trivial 7/7] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL
Posted by Michael Tokarev 3 weeks, 6 days ago
Since CONFIG_EPOLL is now unused, it's okay to
perform this rename, to make it less ugly.

Since epoll is linux-specific and is always
present, we might as well make CONFIG_EPOLL equal
to CONFIG_LINUX.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 meson.build      | 2 +-
 util/aio-posix.h | 4 ++--
 util/meson.build | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index f8b4f06049..552b34f34e 100644
--- a/meson.build
+++ b/meson.build
@@ -2713,7 +2713,7 @@ config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1)
 # has_header_symbol
 config_host_data.set('CONFIG_BLKZONED',
                      cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE'))
-config_host_data.set('CONFIG_EPOLL_CREATE1',
+config_host_data.set('CONFIG_EPOLL',
                      cc.has_header_symbol('sys/epoll.h', 'epoll_create1'))
 config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE',
                      cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUNCH_HOLE') and
diff --git a/util/aio-posix.h b/util/aio-posix.h
index 0cedb8d189..ab894a3c0f 100644
--- a/util/aio-posix.h
+++ b/util/aio-posix.h
@@ -52,7 +52,7 @@ extern const FDMonOps fdmon_poll_ops;
 /* Switch back to poll(2). list_lock must be held. */
 void fdmon_poll_downgrade(AioContext *ctx);
 
-#ifdef CONFIG_EPOLL_CREATE1
+#ifdef CONFIG_EPOLL
 bool fdmon_epoll_try_upgrade(AioContext *ctx, unsigned npfd);
 void fdmon_epoll_setup(AioContext *ctx);
 
@@ -71,7 +71,7 @@ static inline void fdmon_epoll_setup(AioContext *ctx)
 static inline void fdmon_epoll_disable(AioContext *ctx)
 {
 }
-#endif /* !CONFIG_EPOLL_CREATE1 */
+#endif /* !CONFIG_EPOLL */
 
 #ifdef CONFIG_LINUX_IO_URING
 bool fdmon_io_uring_setup(AioContext *ctx, Error **errp);
diff --git a/util/meson.build b/util/meson.build
index 35029380a3..44f0312e8c 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -6,7 +6,7 @@ endif
 if host_os != 'windows'
   util_ss.add(files('aio-posix.c'))
   util_ss.add(files('fdmon-poll.c'))
-  if config_host_data.get('CONFIG_EPOLL_CREATE1')
+  if config_host_data.get('CONFIG_EPOLL')
     util_ss.add(files('fdmon-epoll.c'))
   endif
   util_ss.add(files('compatfd.c'))
-- 
2.47.3
Re: [PATCH trivial 7/7] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL
Posted by Richard Henderson 3 weeks, 1 day ago
On 1/14/26 00:00, Michael Tokarev wrote:
> Since CONFIG_EPOLL is now unused, it's okay to
> perform this rename, to make it less ugly.
> 
> Since epoll is linux-specific and is always
> present, we might as well make CONFIG_EPOLL equal
> to CONFIG_LINUX.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>   meson.build      | 2 +-
>   util/aio-posix.h | 4 ++--
>   util/meson.build | 2 +-
>   3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index f8b4f06049..552b34f34e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2713,7 +2713,7 @@ config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1)
>   # has_header_symbol
>   config_host_data.set('CONFIG_BLKZONED',
>                        cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE'))
> -config_host_data.set('CONFIG_EPOLL_CREATE1',
> +config_host_data.set('CONFIG_EPOLL',
>                        cc.has_header_symbol('sys/epoll.h', 'epoll_create1'))

This is present in glibc 2.9, which is required.
Therefore you can drop this bit of configuration as well.


r~
Re: [PATCH trivial 7/7] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL
Posted by Michael Tokarev 3 weeks ago
On 1/19/26 04:28, Richard Henderson wrote:
> On 1/14/26 00:00, Michael Tokarev wrote:
>> Since CONFIG_EPOLL is now unused, it's okay to
>> perform this rename, to make it less ugly.
>>
>> Since epoll is linux-specific and is always
>> present, we might as well make CONFIG_EPOLL equal
>> to CONFIG_LINUX.
>>
>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>> ---
>>   meson.build      | 2 +-
>>   util/aio-posix.h | 4 ++--
>>   util/meson.build | 2 +-
>>   3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meson.build b/meson.build
>> index f8b4f06049..552b34f34e 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -2713,7 +2713,7 @@ config_host_data.set('CONFIG_INOTIFY1', 
>> have_inotify_init1)
>>   # has_header_symbol
>>   config_host_data.set('CONFIG_BLKZONED',
>>                        cc.has_header_symbol('linux/blkzoned.h', 
>> 'BLKOPENZONE'))
>> -config_host_data.set('CONFIG_EPOLL_CREATE1',
>> +config_host_data.set('CONFIG_EPOLL',
>>                        cc.has_header_symbol('sys/epoll.h', 
>> 'epoll_create1'))
> 
> This is present in glibc 2.9, which is required.
> Therefore you can drop this bit of configuration as well.

It's a bit more tricky, see my comment in the patch description
above.  Yes, epoll_create1 is now always present *on linux*.
But this particular test (cc.has_header_symbol) is run on all
platforms, not only on linux.  So if we drop this test, we'll
have to alias CONFIG_EPOLL to CONFIG_LINUX.  Because epoll is
used outside of linux-user too (eg in the main loop), and there,
the test is CONFIG_EPOLL, not CONFIG_LINUX.

So it might be possible to replace this test with something
like

  config_host_data.set('CONFIG_EPOLL', config_host_data.get('CONFIG_LINUX')

but not drop it entirely.

Thanks,

/mjt

Re: [PATCH trivial 7/7] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL
Posted by Richard Henderson 3 weeks ago
On 1/19/26 18:50, Michael Tokarev wrote:
> On 1/19/26 04:28, Richard Henderson wrote:
>> On 1/14/26 00:00, Michael Tokarev wrote:
>>> Since CONFIG_EPOLL is now unused, it's okay to
>>> perform this rename, to make it less ugly.
>>>
>>> Since epoll is linux-specific and is always
>>> present, we might as well make CONFIG_EPOLL equal
>>> to CONFIG_LINUX.
>>>
>>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>>> ---
>>>   meson.build      | 2 +-
>>>   util/aio-posix.h | 4 ++--
>>>   util/meson.build | 2 +-
>>>   3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meson.build b/meson.build
>>> index f8b4f06049..552b34f34e 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -2713,7 +2713,7 @@ config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1)
>>>   # has_header_symbol
>>>   config_host_data.set('CONFIG_BLKZONED',
>>>                        cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE'))
>>> -config_host_data.set('CONFIG_EPOLL_CREATE1',
>>> +config_host_data.set('CONFIG_EPOLL',
>>>                        cc.has_header_symbol('sys/epoll.h', 'epoll_create1'))
>>
>> This is present in glibc 2.9, which is required.
>> Therefore you can drop this bit of configuration as well.
> 
> It's a bit more tricky, see my comment in the patch description
> above.  Yes, epoll_create1 is now always present *on linux*.
> But this particular test (cc.has_header_symbol) is run on all
> platforms, not only on linux.  So if we drop this test, we'll
> have to alias CONFIG_EPOLL to CONFIG_LINUX.  Because epoll is
> used outside of linux-user too (eg in the main loop), and there,
> the test is CONFIG_EPOLL, not CONFIG_LINUX.
> 
> So it might be possible to replace this test with something
> like
> 
>   config_host_data.set('CONFIG_EPOLL', config_host_data.get('CONFIG_LINUX')
> 
> but not drop it entirely.

 From the patch description, I had expected s/CONFIG_EPOLL/CONFIG_LINUX/.


r~