Upozornenie: Prezeranie týchto stránok je určené len pre návštevníkov nad 18 rokov!
Zásady ochrany osobných údajov.
Používaním tohto webu súhlasíte s uchovávaním cookies, ktoré slúžia na poskytovanie služieb, nastavenie reklám a analýzu návštevnosti. OK, súhlasím









A | B | C | D | E | F | G | H | CH | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

New API
 

New API (also referred to as NAPI) is an interface to use interrupt mitigation techniques for networking devices in the Linux kernel. Such an approach is intended to reduce the overhead of packet receiving. The idea is to defer incoming message handling until there is a sufficient amount of them so that it is worth handling them all at once.

Motivation

A straightforward method of implementing a network driver is to interrupt the kernel by issuing an interrupt request (IRQ) for each and every incoming packet. However, servicing IRQs is costly in terms of processor resources and time. Therefore, the straightforward implementation can be very inefficient in high-speed networks, constantly interrupting the kernel with the thousands of packets per second. Overall performance of the system as well as network throughput can suffer as a result.

Polling is an alternative to interrupt-based processing. The kernel can periodically check for the arrival of incoming network packets without being interrupted, which eliminates the overhead of interrupt processing. Establishing an optimal polling frequency is important, however. Too frequent polling wastes CPU resources by repeatedly checking for incoming packets that have not yet arrived. On the other hand, polling too infrequently introduces latency by reducing system reactivity to incoming packets, and it may result in the loss of packets if the incoming packet buffer fills up before being processed.

As a compromise, the Linux kernel uses the interrupt-driven mode by default and only switches to polling mode when the flow of incoming packets exceeds a certain threshold, known as the "weight" of the network interface.

Compliant drivers

A driver using the NAPI interface will work as follow:

  • Packet receive interrupts are disabled.
  • The driver provides a poll method to the kernel. That method will fetch all incoming packets available, on the network card or a DMA ring, so that they will then be handled by the kernel.
  • When allowed to, the kernel calls the device poll method to possibly handle many packets at once.

Advantages

  • The load induced by interrupts is reduced even though the kernel has to poll.
  • Packets are less likely to be re-ordered, while out of order packet handling might be a bottleneck otherwise. [citation needed]
  • In case the kernel is unable to handle all incoming packets, the kernel does not have to do any work in order to drop them: they are simply overwritten in the network card's incoming ring buffer. Without NAPI, the kernel has to handle every incoming packet regardless of whether there is time to service it, which leads to thrashing.

History

NAPI was an over-three-year effort by Alexey Kuznetsov, Jamal Hadi Salim and Robert Olsson. Initial effort to include NAPI was met with resistance by some members of the community, however David Miller worked hard to ensure NAPI's inclusion.

A lot of real world testing was done in the Uppsala university network before inclusion. In fact, www.slu.se was the first production NAPI-based OS and is still powered to this day by NAPI-based Bifrost/Linux routers. The pktgen traffic generator was also born around this time. Pktgen was extensively used to test NAPI scenarios not induced by real world traffic.

References

Further reading

  • Jamal Hadi Salim; Robert Olsson; Alexey Kuznetsov (2001-11-10). Beyond softnet (PDF). 5th Annual Linux Showcase & Conference (ALS '01). pp. 165–172. Retrieved 2011-03-06. The classical NAPI paper.
  • Jonathan Corbet (2003-04-28). "Driver porting: Network drivers". LWN.net. Retrieved 2011-03-06.
  • Jonathan Corbet (2006-12-18). "Reworking NAPI". LWN.net. Retrieved 2011-03-06.
  • Jonathan Corbet; Alessandro Rubini; Greg Kroah-Hartman (February 2005). "Chapter 17: Networking drivers" (PDF). Linux Device Drivers (3rd ed.). O'Reilly Media. ISBN 978-0-596-00590-0. Retrieved 2011-03-06.

External links

Zdroj:https://en.wikipedia.org?pojem=New_API
>Text je dostupný pod licencí Creative Commons Uveďte autora – Zachovejte licenci, případně za dalších podmínek. Podrobnosti naleznete na stránce Podmínky užití.

čítajte viac o New_API


čítajte viac na tomto odkaze: New API



Hladanie1.

Special:EditPage/New API
Talk:New API
Help:Maintenance template removal
Wikipedia:Citing sources
Wikipedia:Further reading
Wikipedia:External links
Wikipedia:Citing sources#Inline citations
Wikipedia:WikiProject Fact and Reference Check
Wikipedia:When to cite
Help:Maintenance template removal
File:Question book-new.svg
Wikipedia:Verifiability
Wikipedia:No original research#Primary, secondary and tertiary sources
Wikipedia:No original research#Primary, secondary and tertiary sources
Help:Maintenance template removal
File:Wiki letter w.svg
Wikipedia:Manual of Style/Lead section#Length
Wikipedia:Summary style
Wikipedia:Manual of Style/Lead section#Provide an accessible overview
Help:Maintenance template removal
Interrupt mitigation
Linux kernel
Interrupt request
Polling (computer science)
Direct memory access
Interrupt request
Wikipedia:Citation needed
Network card
Ring buffer
Thrashing (computer science)
David S. Miller
Uppsala University
Packet generator
LWN.net
LWN.net
ISBN (identifier)
Special:BookSources/978-0-596-00590-0
Wikipedia:Link rot
Wayback Machine
Template:Linux kernel
Template talk:Linux kernel
Special:EditPage/Template:Linux kernel
Linux kernel
Linux Foundation
Linux Mark Institute
Linus's law
Tanenbaum–Torvalds debate
Tux (mascot)
SCO–Linux disputes
Linaro
GNU General Public License#Version 2
Menuconfig
List of Linux-supported computer architectures
Linux kernel version history
Criticism of Linux
The Linux Programming Interface
Kernel.org
Linux kernel mailing list
Linux conference
Linux user group
CRIU
Ftrace
Kdump (Linux)
Linux kernel oops
SystemTap
Berkeley Packet Filter
Booting process of Linux
Vmlinux
System.map
Dracut (software)
Initrd
Initramfs
Linux kernel interfaces
Linux Standard Base
X32 ABI
Linux kernel interfaces
Linux kernel interfaces#SCI
POSIX
Ioctl
Select (Unix)
Open (system call)
Read (system call)
Close (system call)
Sync (Unix)
Linux kernel interfaces#Additions to POSIX
Futex
Epoll
Splice (system call)
Dnotify
Inotify
Readahead
Linux kernel interfaces#In–kernel APIs
Advanced Linux Sound Architecture
Crypto API (Linux)
Io uring
Direct Rendering Manager
Kernfs (Linux)
Memory barrier
Read-copy-update
Video4Linux
IIO Framework
User space and kernel space
Daemon (computing)
Virtual file system
Configfs
Devfs
Devpts
Debugfs
Filesystem in Userspace
Procfs
Sysfs
Tmpfs
Systemd
Udev
Kmscon
Wrapper library
C standard library
Glibc
UClibc
Bionic (software)
Libhybris
Dietlibc
Embedded GLIBC
Klibc
Musl
Newlib
Cgroups
Direct Rendering Manager
Advanced Linux Sound Architecture
Evdev
Libusb
Io uring
Loadable kernel module
BlueZ
Cgroups
Linux console
Bcache
Device mapper
Dm-cache
Dm-crypt
Direct Rendering Manager
EDAC (Linux)
Evdev
Kernel same-page merging
LIO (SCSI target)
Linux framebuffer
Logical Volume Manager (Linux)
KMS driver
Netfilter
Netlink
Nftables
Network scheduler
Perf (Linux)
SLUB (software)
Zram
Zswap
Scheduling (computing)#Linux
Brain Fuck Scheduler
Completely Fair Scheduler
Earliest eligible virtual deadline first scheduling
Noop scheduler
O(n) scheduler
O(1) scheduler
SCHED DEADLINE
SCHED FIFO
SCHED RR
Linux Security Modules
AppArmor
Exec Shield
Seccomp
Security-Enhanced Linux
Smack (software)
Tomoyo Linux
Linux PAM
Device driver
Comparison of open-source wireless drivers
Free and open-source graphics device driver
Raw device
Initramfs
KernelCare
Kexec
KGraft
Kpatch
Ksplice
Mainline Linux
Linux kernel
Linux-libre
High-performance computing
INK (operating system)
Compute Node Linux
Slurm Workload Manager
Real-time computing
RTLinux
RTAI
Xenomai
PREEMPT RT
Memory management unit
ΜClinux
PSXLinux
Virtualization
Hypervisor
Kernel-based Virtual Machine
Xen
OS-level virtualization
Linux-VServer
Lguest
LXC
OpenVZ
L4Linux
ELinOS
User-mode Linux
MkLinux
Cooperative Linux
Linux adoption
Linux range of use
Linux desktop environments
Linux on embedded systems
Video games and Linux
Linux Terminal Server Project
LAMP (software bundle)
LYME (software bundle)
Linux-powered device
List of Linux adopters
File:NewTux.svg
Portal:Linux
Portal:Free and open-source software
Category:Linux kernel
Template:Linux
Template talk:Linux
Special:EditPage/Template:Linux
Linux
Linux kernel
History of Linux
Linus's law
Linux-libre
Booting process of Linux
Linux kernel oops
Tux (mascot)
Template:Linux kernel
Criticism of Linux
Criticism of desktop Linux
GNU/Linux naming controversy
Tanenbaum–Torvalds debate
SCO–Linux disputes
Linux distribution
Comparison of Linux distributions
List of Linux distributions
Comparison of netbook-oriented Linux distributions
List of Linux distributions that run from RAM
Light-weight Linux distribution
Security-focused operating system#Linux
Package manager
Package format
List of software package management systems
LinuxChix
Linux Counter
Linux Documentation Project
Linux Foundation
Linux Mark Institute
Linux user group
Linux adoption
List of Linux adopters
Linux desktop environments
Linux on embedded systems
Linux gaming
Linux for mobile devices
Linux range of use
Linux malware
DistroWatch
Free Software Magazine
Full Circle (magazine)
Linux.com
Linux Format
Linux Gazette
Linux Journal
Linux Magazine
LinuxUser
Ubuntu User
Linux Outlaws
Linux Voice
LugRadio
LWN.net
Phoronix Test Suite#Phoronix website
Revolution OS
The Code (2001 film)
List of computer security certifications
CompTIA Linux+
Linux Foundation Linux Certification
Red Hat Certification Program
Ubuntu Professional Certification
File:NewTux.svg
Portal:Linux
Portal:Free and open-source software
Category:Linux
New API
New API
Main Page
Wikipedia:Contents
Portal:Current events
Special:Random
Wikipedia:About
Wikipedia:Contact us
Special:FundraiserRedirector?utm source=donate&utm medium=sidebar&utm campaign=C13 en.wikipedia.org&uselang=en
Help:Contents
Help:Introduction
Wikipedia:Community portal
Special:RecentChanges
Wikipedia:File upload wizard
Main Page
Special:Search
Help:Introduction
Special:MyContributions
Special:MyTalk
New API
Special:EntityPage/Q15995352#sitelinks-wikipedia
New API
Talk:New API
New API
New API
Updating...x




Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok.
Podrobnejšie informácie nájdete na stránke Podmienky použitia.