Skip to contentSkip to conversation

pps: add epoll support

PATCH Denis OSTERLAND-HEIM 2 participants 2 messages Feb 25, 2025 – Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 7 lines

-----Original Message-----
From: Rodolfo Giometti <[email protected]>
Sent: Tuesday, February 25, 2025 3:24 PM
To: Denis OSTERLAND-HEIM <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] pps: add epoll support

[snip]

Quoted 14 lines
Quoted 4 lines

If I start multiple user space programs data races are visible.

```

Quoted 9 lines
# for i in 0 1 2 3 4 5 6; do PpsPollTest /dev/pps1 > log$i & done
# sleep 6
# tail log*
==> log0 <==
timeout
assert: 196
time: 1520599554.276752928
assert: 197
time: 1520599555.300692704
Quoted 2 lines

This is the same behavior we have when working with a serial port: if more than one process gets access to it, data is stolen.

Okay, then lets choose your suggestion.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

From my point of view it would be great to fix this bug without such an limitation.

I disagree, it is not a limitation! It is like a normal char device work.

What we have to test now is if your initial goal has been addressed! That is, in an application that has more to do than just dealing with one PPS device, we can use poll()/select() in order to avoid using threads.

I will do the final test.
I expect that it works with your patch.

Shall I prepare the patch?
Shall I add you as Co-author?
Or do you want to send your patch with me in reported-by and tested-by?

Fixes eae9d2ba0cfc ("LinuxPPS: core support")?

CC stable?

Regards, Denis

Quoted 11 lines

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming
#1 lore raw
Quoted 29 lines · Denis OSTERLAND-HEIM

Hi,

Quoted 7 lines

-----Original Message-----
From: Rodolfo Giometti <[email protected]>
Sent: Tuesday, February 25, 2025 3:24 PM
To: Denis OSTERLAND-HEIM <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] pps: add epoll support

[snip]

Quoted 14 lines
Quoted 4 lines

If I start multiple user space programs data races are visible.

```

Quoted 9 lines
# for i in 0 1 2 3 4 5 6; do PpsPollTest /dev/pps1 > log$i & done
# sleep 6
# tail log*
==> log0 <==
timeout
assert: 196
time: 1520599554.276752928
assert: 197
time: 1520599555.300692704
Quoted 2 lines

This is the same behavior we have when working with a serial port: if more than one process gets access to it, data is stolen.

Okay, then lets choose your suggestion.

Quoted 1 line
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

From my point of view it would be great to fix this bug without such an limitation.

I disagree, it is not a limitation! It is like a normal char device work.

What we have to test now is if your initial goal has been addressed! That is, in an application that has more to do than just dealing with one PPS device, we can use poll()/select() in order to avoid using threads.

I will do the final test.

Try poll() by using a process workin on multiple pps sources.

Quoted 1 line

I expect that it works with your patch.

:)

Quoted 1 line

Shall I prepare the patch?

Yes.

Quoted 1 line

Shall I add you as Co-author?

Yes. Add my name in the Signed-off-by: line and, please, send to me a preview.

Quoted 3 lines

Or do you want to send your patch with me in reported-by and tested-by?

Fixes eae9d2ba0cfc ("LinuxPPS: core support")?

OK.

Quoted 1 line

CC stable?

Greg Kroah-Hartman <[email protected]> Andrew Morton <[email protected]>

And explain the goal of the patch within the description.

Thanks a lot!

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming