Skip to content

Excessive CPU usage when running CAN port  #1

@petebannister

Description

@petebannister

Due to:

#define LDX_CAN_DEF_TOUT_SEC 0
#define LDX_CAN_DEF_TOUT_USEC 0

The select call in the CAN thread does not block. If non-blocking behaviour would be preferred here, what is the point of using a thread at all? sched_yield does not help to drop the cpu much below 100%.

I would have preferred to be able to open the port and not have a thread created on your behalf. The documentation does not even mention that it starts a thread.

If I hack something to tweak the can_tout value in the private data then there is drastic improvement in CPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions