kernel

request_threaded_irq() is used in the driver why not request_irq()? What are the differences between two?

為{幸葍}努か 提交于 2020-01-12 08:44:08
问题 I posted this is the thread which discussed about request_threaded_irq but I did not get any reply. So I am posting it freshly. I am working on a touchscreen driver for capacitive touchscree. It used request_threaded_irq() call instead of request_irq(). I could not understand the basic difference betweeen two. It says :- Name request_threaded_irq — allocate an interrupt line Synopsis int request_threaded_irq (unsigned int irq, irq_handler_t handler,irq_handler_t thread_fn, unsigned long

[转帖]sysctl.conf学习和调优

允我心安 提交于 2020-01-12 07:51:22
sysctl.conf学习和调优 https://www.jianshu.com/p/9a8e383b5b49 前言 记得第一次接触 /etc/security/limits.conf 和 /etc/sysctl.conf 时是因为部署Oracle时要按需修改内核参数。limits.conf文件实际是Linux PAM(插入式认证模块,Pluggable Authentication Modules)中 pam_limits.so 的配置文件,突破系统的默认限制,对系统访问资源有一定保护作用。 limits.conf 和sysctl.conf区别在于limits.conf是针对用户,而sysctl.conf是针对整个系统参数配置。 调整limits.conf和sysctl.conf参数是有必要的 更新历史 2015年08月10日 - 初稿 阅读原文 - http://wsgzao.github.io/post/sysctl/ 扩展阅读 设置Sysctl.conf用以提高Linux的性能(最完整的sysctl.conf优化方案) - http://blog.csdn.net/21aspnet/article/details/6584792 limits.conf工作原理 - http://my.oschina.net/987openlab/blog/94634 ulimit命令 -

When does the probe function for a Linux kernel driver gets called?

最后都变了- 提交于 2020-01-12 06:49:23
问题 I am trying to update a kernel driver for Android, I have added some printk's to debug it, the _init function is invoked, but the probe function is not. What I am missing ? When/how is the probe function invoked ? The code is available at: https://github.com/lamegopinto/kernel-2.6.32.27-M722HC/blob/master/drivers/power/rk2918_battery.c 回答1: Found the answer after some research, For a "platform" device the probe function is invoked when a platform device is registered and it's device name

How does Docker for Windows run Linux containers?

谁说胖子不能爱 提交于 2020-01-12 06:18:20
问题 In the old versions of Docker for Windows, I remember it explicitly said it used a linux VM for the kernel. But since the new stable version (released in July 2016 I think), it says Docker for Windows is a native Windows application with a native user interface and auto-update capability, deeply integrated with Windows native virtualization, Hyper-V, networking and file system If I understand correctly, the specified base image is for the user space and the host's kernel is used. So, if I

What context does a Linux kernel timer function runs in?

跟風遠走 提交于 2020-01-12 03:31:21
问题 When a timer created with the add_timer API expires and the function assigned at the timer structure runs, in what context does it run? Is it interrupt context or some kernel process context? 回答1: It is of course in interrupt context, more precisely, in softirq context, see below (kernel/timer.c): static inline void __run_timers(struct tvec_base *base) { struct timer_list *timer; spin_lock_irq(&base->lock); while (time_after_eq(jiffies, base->timer_jiffies)) { struct list_head work_list;

Linux kernel CONFIG_DEBUG_SECTION_MISMATCH make errors

混江龙づ霸主 提交于 2020-01-12 03:19:23
问题 During the "make" step of the Linux kernel compilation I get lots of these errors: Building modules, stage 2. MODPOST 2283 modules WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' I know I can just do a make CONFIG_DEBUG_SECTION_MISMATCH= y and go ahead with it, but I want to know if there is any better way to handle this. Maybe reporting to someone or how I fix these problems myself, etc. 回答1: This is just a

海思AI芯片(Hi3516DV300/CV500)开发(3.搭建Linux开发环境)

房东的猫 提交于 2020-01-12 00:19:44
目录 1、软件包安装 2、编译arm-himix200交叉编译器 3、编译uboot和Kernel 前言:此篇搭建环境的Linux平台为ubuntu16.0.4 64位系统,SDK的目标平台为Hi3519DV300\CV500系列。 1、软件包安装 步骤 1 配置默认使用 bash 执行 #sudo dpkg-reconfigure dash 选择 no 步骤 2 安装软件包 执行: #sudo apt-get install make libc6:i386 lib32z1 lib32stdc++6 zlib1g-dev libncurses5-dev ncurses-term libncursesw5-dev g++ u-boot-tools:i386 texinfo texlive gawk libssl-dev openssl bc 步骤 3 创建/etc/ld.so.preload 文件 并执行 #echo "" > /etc/ld.so.preload 以解决 64bit linuxserver 上某些第三方库编译失败的问题。 步骤 4 安装其他软件包 因为Linux交叉编译器是32位的,而ubuntu16.0.4是64位的,因此需要安装lib32ncurses5和lib32z1兼容x86的运行库及环境。 #sudo apt-get install

【并行计算-CUDA开发】CUDA ---- Warp解析

≯℡__Kan透↙ 提交于 2020-01-11 20:59:56
Warp 逻辑上,所有thread是并行的,但是,从硬件的角度来说,实际上并不是所有的thread能够在同一时刻执行,接下来我们将解释有关warp的一些本质。 Warps and Thread Blocks warp是SM的基本执行单元。一个warp包含32个并行thread,这32个thread执行于SMIT模式。也就是说所有thread执行同一条指令,并且每个thread会使用各自的data执行该指令。 block可以是一维二维或者三维的,但是,从硬件角度看,所有的thread都被组织成一维,每个thread都有个唯一的ID( ID的计算可以在之前的博文查看 )。 每个block的warp数量可以由下面的公式计算获得: 一个warp中的线程必然在同一个block中,如果block所含线程数目不是warp大小的整数倍,那么多出的那些thread所在的warp中,会剩余一些inactive的thread,也就是说,即使凑不够warp整数倍的thread,硬件也会为warp凑足,只不过那些thread是inactive状态,需要注意的是,即使这部分thread是inactive的,也会消耗SM资源。 Warp Divergence 控制流语句普遍存在于各种编程语言中,GPU支持传统的,C-style,显式控制流结构,例如if…else,for,while等等。

CUDA ---- Warp解析

耗尽温柔 提交于 2020-01-11 20:56:36
Warp 逻辑上,所有thread是并行的,但是,从硬件的角度来说,实际上并不是所有的thread能够在同一时刻执行,接下来我们将解释有关warp的一些本质。 Warps and Thread Blocks warp是SM的基本执行单元。一个warp包含32个并行thread,这32个thread执行于SMIT模式。也就是说所有thread执行同一条指令,并且每个thread会使用各自的data执行该指令。 block可以是一维二维或者三维的,但是,从硬件角度看,所有的thread都被组织成一维,每个thread都有个唯一的ID( ID的计算可以在之前的博文查看 )。 每个block的warp数量可以由下面的公式计算获得: 一个warp中的线程必然在同一个block中,如果block所含线程数目不是warp大小的整数倍,那么多出的那些thread所在的warp中,会剩余一些inactive的thread,也就是说,即使凑不够warp整数倍的thread,硬件也会为warp凑足,只不过那些thread是inactive状态,需要注意的是,即使这部分thread是inactive的,也会消耗SM资源。 Warp Divergence 控制流语句普遍存在于各种编程语言中,GPU支持传统的,C-style,显式控制流结构,例如if…else,for,while等等。

【并行计算-CUDA开发】CUDA ---- Warp解析

前提是你 提交于 2020-01-11 20:53:30
Warp 逻辑上,所有thread是并行的,但是,从硬件的角度来说,实际上并不是所有的thread能够在同一时刻执行,接下来我们将解释有关warp的一些本质。 Warps and Thread Blocks warp是SM的基本执行单元。一个warp包含32个并行thread,这32个thread执行于SMIT模式。也就是说所有thread执行同一条指令,并且每个thread会使用各自的data执行该指令。 block可以是一维二维或者三维的,但是,从硬件角度看,所有的thread都被组织成一维,每个thread都有个唯一的ID( ID的计算可以在之前的博文查看 )。 每个block的warp数量可以由下面的公式计算获得: 一个warp中的线程必然在同一个block中,如果block所含线程数目不是warp大小的整数倍,那么多出的那些thread所在的warp中,会剩余一些inactive的thread,也就是说,即使凑不够warp整数倍的thread,硬件也会为warp凑足,只不过那些thread是inactive状态,需要注意的是,即使这部分thread是inactive的,也会消耗SM资源。 Warp Divergence 控制流语句普遍存在于各种编程语言中,GPU支持传统的,C-style,显式控制流结构,例如if…else,for,while等等。