Drop old setPriority related code

This code is not needed anymore since we are setting SCHED_RR scheduler
with a real time priority in main thread during startup, so all threads
will inherit same rt priority, which should be enough to keep the
process working reliably even on high system loads (from non rt
processes).

osmo-trx was tested to be reliable during test with stress-ng as
explained in related ticket below.

Related: OS#2344
Change-Id: I3a88946dd71e9aeeaac9d19d396e2236c302b608
This commit is contained in:
Pau Espin 2019-08-21 13:00:38 +02:00
parent 3eed8ebb0d
commit 67aa91b2c0
8 changed files with 0 additions and 32 deletions

View File

@ -1126,8 +1126,6 @@ void *RxUpperLoopAdapter(TrxChanThParams *params)
snprintf(thread_name, 16, "RxUpper%zu", num);
set_selfthread_name(thread_name);
trx->setPriority(0.42);
while (1) {
trx->driveReceiveFIFO(num);
pthread_testcancel();
@ -1139,8 +1137,6 @@ void *RxLowerLoopAdapter(Transceiver *transceiver)
{
set_selfthread_name("RxLower");
transceiver->setPriority(0.45);
while (1) {
transceiver->driveReceiveRadio();
pthread_testcancel();
@ -1152,8 +1148,6 @@ void *TxLowerLoopAdapter(Transceiver *transceiver)
{
set_selfthread_name("TxLower");
transceiver->setPriority(0.44);
while (1) {
transceiver->driveTxFIFO();
pthread_testcancel();
@ -1190,8 +1184,6 @@ void *TxUpperLoopAdapter(TrxChanThParams *params)
snprintf(thread_name, 16, "TxUpper%zu", num);
set_selfthread_name(thread_name);
trx->setPriority(0.40);
while (1) {
trx->driveTxPriorityQueue(num);
pthread_testcancel();

View File

@ -247,9 +247,6 @@ protected:
void reset();
/** set priority on current thread */
void setPriority(float prio = 0.5) { mRadioInterface->setPriority(prio); }
void logRxBurst(size_t chan, const struct trx_ul_burst_ind *bi);
};

View File

@ -70,9 +70,6 @@ class RadioDevice {
/** Get the Tx window type */
virtual enum TxWindowType getWindowType()=0;
/** Enable thread priority */
virtual void setPriority(float prio = 0.5) = 0;
/**
Read samples from the radio.
@param buf preallocated buf to contain read result

View File

@ -85,10 +85,6 @@ public:
/** Stop the LMS */
bool stop();
/** Set priority not supported */
void setPriority(float prio = 0.5) {
}
enum TxWindowType getWindowType() {
return TX_WINDOW_LMS1;
}

View File

@ -125,7 +125,6 @@ static const std::map<dev_key, dev_desc> dev_param_map {
void *async_event_loop(uhd_device *dev)
{
set_selfthread_name("UHDAsyncEvent");
dev->setPriority(0.43);
while (1) {
dev->recv_async_msg();
@ -643,12 +642,6 @@ bool uhd_device::stop()
return true;
}
void uhd_device::setPriority(float prio)
{
uhd::set_thread_priority_safe(prio);
return;
}
int uhd_device::check_rx_md_err(uhd::rx_metadata_t &md, ssize_t num_smpls)
{
if (!num_smpls) {

View File

@ -71,7 +71,6 @@ public:
bool start();
bool stop();
bool restart();
void setPriority(float prio);
enum TxWindowType getWindowType() { return tx_window; }
int readSamples(std::vector<short *> &bufs, int len, bool *overrun,

View File

@ -107,9 +107,6 @@ private:
/** Stop the USRP */
bool stop();
/** Set priority not supported */
void setPriority(float prio = 0.5) { }
enum TxWindowType getWindowType() { return TX_WINDOW_USRP1; }
/**

View File

@ -127,9 +127,6 @@ public:
/** returns the full-scale receive amplitude **/
double fullScaleOutputValue();
/** set thread priority on current thread */
void setPriority(float prio = 0.5) { mRadio->setPriority(prio); }
/** get transport window type of attached device */
enum RadioDevice::TxWindowType getWindowType() { return mRadio->getWindowType(); }