Skip to content

UDPSOCKET_ECHOTEST_NONBLOCK performance improvement. #10776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2019

Conversation

tymoteuszblochmobica
Copy link
Contributor

Description

Refactoring UDPSOCKET_ECHOTEST_NONBLOCK test according to request from:
"ONME-4244 UDPSOCKET_ECHOTEST_NONBLOCK performance is not optimal".
Removed unnecessary thread creation for nonblocking socket read.
It will not improve latency for WISE-1570 but will keep code more readable.

Pull request type

[ ] Fix
[x] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@SeppoTakalo

Release Notes

@ciarmcom ciarmcom requested review from SeppoTakalo and a team June 6, 2019 13:00
@ciarmcom
Copy link
Member

ciarmcom commented Jun 6, 2019

@tymoteuszblochmobica, thank you for your changes.
@SeppoTakalo @ARMmbed/mbed-os-test @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

if (tc_exec_time.read() >= time_allotted) {
break;
}
signals.wait_all(SIGNAL_SIGIO_RX, SIGIO_TIMEOUT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous loop uses osSignalWait(SIGNAL_SIGIO_TX, SIGIO_TIMEOUT).status == osEventTimeout) which will wait that signal send to current thread.
However, I don't see anyone sending that signal.

The _sigio_handler() seems to set flags only on this EventFlags signals variable.

Please fix the previous loop to use the same eventflag variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

}
break;
drop_bad_packets(*sock, 0); // timeout equivalent to set_blocking(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this drop_bad_packets()?

I don't see any need for it.. If we did not receive all packets, then what is there to receive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@tymoteuszblochmobica
Copy link
Contributor Author

Updated

@SeppoTakalo
Copy link
Contributor

There is conflict, so please rebase your work on top of master and push into this branch again.

@tymoteuszblochmobica
Copy link
Contributor Author

Rebased

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 13, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 13, 2019

Test run: FAILED

Summary: 1 of 3 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 14, 2019

There's fix proposed in #10833, will restart CI after

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 15, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mbed-ci
Copy link

mbed-ci commented Jun 18, 2019

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 3
Build artifacts

@adbridge adbridge merged commit 14b77c9 into ARMmbed:master Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants