Git Product home page Git Product logo

Comments (8)

jpilet avatar jpilet commented on July 17, 2024

I noticed that after the bug, the CPU usage is quite high. I profiled the kernel using perf, and I got the following results:

# Overhead          Command      Shared Object                              Symbol
# ........  ...............  .................  ..................................
# 
    48.77%     kworker/u4:2  [kernel.kallsyms]  [k] u8_writer
               |
               --- u8_writer
                  |
                  |--99.01%-- poll_writer
                  |          process_one_work
                  |          worker_thread
                  |          kthread
                  |          ret_from_kernel_thread
                  |
                   --0.99%-- process_one_work
                             worker_thread
                             kthread
                             ret_from_kernel_thread

    47.15%     kworker/u4:1  [kernel.kallsyms]  [k] u8_reader
               |
               --- u8_reader
                  |
                  |--96.54%-- handle_message
                  |          pump_messages
                  |          process_one_work
                  |          worker_thread
                  |          kthread
                  |          ret_from_kernel_thread
                  |
                   --3.46%-- pump_messages
                             process_one_work
                             worker_thread
                             kthread
                             ret_from_kernel_thread

     2.61%     kworker/u4:1  [kernel.kallsyms]  [k] handle_message

u8_writer and u8_reader are part of spi-pxa2xx (https://github.com/01org/edison-linux/blob/8cd9234c64c584432f6992fe944ca9e46ca8ea76/drivers/spi/spi-pxa2xx.c#L338)
It seems that one thread is polling trying to write while the other one is polling trying to read. Without success.
@westeri @jhnikula @andy-shev @broonie do you have any idea of what could put the SPI logic is such a locked state?

from edison-linux.

broonie avatar broonie commented on July 17, 2024

from edison-linux.

jpilet avatar jpilet commented on July 17, 2024

which mailing list?

from edison-linux.

broonie avatar broonie commented on July 17, 2024

On Mon, Jan 11, 2016 at 06:50:19AM -0800, Julien Pilet wrote:

which mailing list?

SPI SUBSYSTEM
M: Mark Brown [email protected]
L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
Q: http://patchwork.kernel.org/project/spi-devel-general/list/
S: Maintained
F: Documentation/spi/
F: drivers/spi/
F: include/linux/spi/
F: include/uapi/linux/spi/

from edison-linux.

jpilet avatar jpilet commented on July 17, 2024

Thanks. My mistake. The problem is most probably not in pxa2xx.c but in drivers/spi/intel_mid_ssp_spi.c, which is not upstream.

from edison-linux.

andy-shev avatar andy-shev commented on July 17, 2024

@jpilet, I would suggest to try my https://github.com/andy-shev/linux/tree/eds branch and continue with upstream.

from edison-linux.

chenchux avatar chenchux commented on July 17, 2024

https://github.com/01org/edison-linux/commits/edison-3.10.17

New patch has fixed SPI issue, please refer to commit above.

But user should notice that SPI clock frequency should be set above 1MHz, otherwise DMA will fail to transfer data.

In Yocto release 2, SPI transfer method is polling, and now it has switched to DMA method, and SPI transfer speed could improve a lot.
If Clock Frequency lower than 1MHZ(MAX support up to 24MHZ), data transferring will be failed.
(Actually, data transferring will be failed if set frequence lower than 800KHZ).

If increase working frequency to 1MHZ, the issue will be gone.
//mraa_spi_frequency(spi,10000);
mraa_spi_frequency(spi,1000000);

from edison-linux.

andy-shev avatar andy-shev commented on July 17, 2024

@chenchux In upstream kernel it's fixed. I guess you may transfer even with lower speeds if you want to.

from edison-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.