亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? readme

?? 優龍2410linux2.6.8內核源代碼
??
?? 第 1 頁 / 共 5 頁
字號:
Devfs (Device File System) FAQLinux Devfs (Device File System) FAQRichard Gooch20-AUG-2002Document languages:-----------------------------------------------------------------------------NOTE: the master copy of this document is available online at:http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.htmland looks much better than the text version distributed with thekernel sources. A mirror site is available at:http://www.ras.ucalgary.ca/~rgooch/linux/docs/devfs.htmlThere is also an optional daemon that may be used with devfs. You canfind out more about it at:http://www.atnf.csiro.au/~rgooch/linux/A mailing list is available which you may subscribe to. Sendemailto majordomo@oss.sgi.com with the following line in thebody of the message:subscribe devfsTo unsubscribe, send the message body:unsubscribe devfsinstead. The list is archived athttp://oss.sgi.com/projects/devfs/archive/.-----------------------------------------------------------------------------ContentsWhat is it?Why do it?Who else does it?How it worksOperational issues (essential reading)Instructions for the impatientPermissions persistence across rebootsDealing with drivers without devfs supportAll the way with DevfsOther IssuesKernel Naming SchemeDevfsd Naming SchemeOld Compatibility NamesSCSI Host Probing IssuesDevice drivers currently portedAllocation of Device NumbersQuestions and AnswersMaking things workAlternatives to devfsWhat I don't like about devfsHow to report bugsStrange kernel messagesCompilation problems with devfsdOther resourcesTranslations of this document-----------------------------------------------------------------------------What is it?Devfs is an alternative to "real" character and block special deviceson your root filesystem. Kernel device drivers can register devices byname rather than major and minor numbers. These devices will appear indevfs automatically, with whatever default ownership andprotection the driver specified. A daemon (devfsd) can be used tooverride these defaults. Devfs has been in the kernel since 2.3.46.NOTE that devfs is entirely optional. If you prefer the olddisc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (thedefault). In this case, nothing will change.  ALSO NOTE that if you doenable devfs, the defaults are such that full compatibility ismaintained with the old devices names.There are two aspects to devfs: one is the underlying devicenamespace, which is a namespace just like any mounted filesystem. Theother aspect is the filesystem code which provides a view of thedevice namespace. The reason I make a distinction is because devfscan be mounted many times, with each mount showing the same devicenamespace. Changes made are global to all mounted devfs filesystems.Also, because the devfs namespace exists without any devfs mounts, youcan easily mount the root filesystem by referring to an entry in thedevfs namespace.The cost of devfs is a small increase in kernel code size and memoryusage. About 7 pages of code (some of that in __init sections) and 72bytes for each entry in the namespace. A modest system has only acouple of hundred device entries, so this costs a few morepages. Compare this with the suggestion to put /dev on a <ahref="#why-faq-ramdisc">ramdisc.On a typical machine, the cost is under 0.2 percent. On a modestsystem with 64 MBytes of RAM, the cost is under 0.1 percent.  Theaccusations of "bloatware" levelled at devfs are not justified.-----------------------------------------------------------------------------Why do it?There are several problems that devfs addresses. Some of theseproblems are more serious than others (depending on your point ofview), and some can be solved without devfs. However, the totality ofthese problems really calls out for devfs.The choice is a patchwork of inefficient user space solutions, whichare complex and likely to be fragile, or to use a simple and efficientdevfs which is robust.There have been many counter-proposals to devfs, all seeking toprovide some of the benefits without actually implementing devfs. Sofar there has been an absence of code and no proposed alternative hasbeen able to provide all the features that devfs does. Further,alternative proposals require far more complexity in user-space (andstill deliver less functionality than devfs). Some people have themantra of reducing "kernel bloat", but don't consider the effects onuser-space.A good solution limits the total complexity of kernel-space anduser-space.Major&minor allocationThe existing scheme requires the allocation of major and minor devicenumbers for each and every device. This means that a centralco-ordinating authority is required to issue these device numbers(unless you're developing a "private" device driver), in order topreserve uniqueness. Devfs shifts the burden to a namespace. This maynot seem like a huge benefit, but actually it is. Since driver authorswill naturally choose a device name which reflects the functionalityof the device, there is far less potential for namespace conflict.Solving this requires a kernel change./dev managementBecause you currently access devices through device nodes, these mustbe created by the system administrator. For standard devices you canusually find a MAKEDEV programme which creates all these (hundreds!)of nodes. This means that changes in the kernel must be reflected bychanges in the MAKEDEV programme, or else the system administratorcreates device nodes by hand.The basic problem is that there are two separate databases ofmajor and minor numbers. One is in the kernel and one is in /dev (orin a MAKEDEV programme, if you want to look at it that way). This isduplication of information, which is not good practice.Solving this requires a kernel change./dev growthA typical /dev has over 1200 nodes! Most of these devices simply don'texist because the hardware is not available. A huge /dev increases thetime to access devices (I'm just referring to the dentry lookup timesand the time taken to read inodes off disc: the next subsection showssome more horrors).An example of how big /dev can grow is if we consider SCSI devices:host           6  bits  (say up to 64 hosts on a really big machine)channel        4  bits  (say up to 16 SCSI buses per host)id             4  bitslun            3  bitspartition      6  bitsTOTAL          23 bitsThis requires 8 Mega (1024*1024) inodes if we want to store allpossible device nodes. Even if we scrap everything but id,partitionand assume a single host adapter with a single SCSI bus and only onelogical unit per SCSI target (id), that's still 10 bits or 1024inodes. Each VFS inode takes around 256 bytes (kernel 2.1.78), sothat's 256 kBytes of inode storage on disc (assuming real inodes takea similar amount of space as VFS inodes). This is actually not so bad,because disc is cheap these days. Embedded systems would care about256 kBytes of /dev inodes, but you could argue that embedded systemswould have hand-tuned /dev directories. I've had to do just that on myembedded systems, but I would rather just leave it to devfs.Another issue is the time taken to lookup an inode when firstreferenced. Not only does this take time in scanning through a list inmemory, but also the seek times to read the inodes off disc.This could be solved in user-space using a clever programme whichscanned the kernel logs and deleted /dev entries which are notavailable and created them when they were available. This programmewould need to be run every time a new module was loaded, which wouldslow things down a lot.There is an existing programme called scsidev which will automaticallycreate device nodes for SCSI devices. It can do this by scanning filesin /proc/scsi. Unfortunately, to extend this idea to other devicenodes would require significant modifications to existing drivers (sothey too would provide information in /proc). This is a non-trivialchange (I should know: devfs has had to do something similar). Onceyou go to this much effort, you may as well use devfs itself (whichalso provides this information).  Furthermore, such a system wouldlikely be implemented in an ad-hoc fashion, as different drivers willprovide their information in different ways.Devfs is much cleaner, because it (naturally) has a uniform mechanismto provide this information: the device nodes themselves!Node to driver file_operations translationThere is an important difference between the way disc-based characterand block nodes and devfs entries make the connection between an entryin /dev and the actual device driver.With the current 8 bit major and minor numbers the connection betweendisc-based c&b nodes and per-major drivers is done through afixed-length table of 128 entries. The various filesystem types setthe inode operations for c&b nodes to {chr,blk}dev_inode_operations,so when a device is opened a few quick levels of indirection bring usto the driver file_operations.For miscellaneous character devices a second step is required: thereis a scan for the driver entry with the same minor number as the filethat was opened, and the appropriate minor open method is called. Thisscanning is done *every time* you open a device node. Potentially, youmay be searching through dozens of misc. entries before you find youropen method. While not an enormous performance overhead, this doesseem pointless.Linux *must* move beyond the 8 bit major and minor barrier,somehow. If we simply increase each to 16 bits, then the indexingscheme used for major driver lookup becomes untenable, because themajor tables (one each for character and block devices) would need tobe 64 k entries long (512 kBytes on x86, 1 MByte for 64 bitsystems). So we would have to use a scheme like that used formiscellaneous character devices, which means the search time goes uplinearly with the average number of major device drivers on yoursystem. Not all "devices" are hardware, some are higher-level driverslike KGI, so you can get more "devices" without adding hardwareYou can improve this by creating an ordered (balanced:-)binary tree, in which case your search time becomes log(N).Alternatively, you can use hashing to speed up the search.But why do that search at all if you don't have to? Once again, itseems pointless.Note that devfs doesn't use the major&minor system. For devfsentries, the connection is done when you lookup the /dev entry. Whendevfs_register() is called, an internal table is appended which hasthe entry name and the file_operations. If the dentry cache doesn'thave the /dev entry already, this internal table is scanned to get thefile_operations, and an inode is created. If the dentry cache alreadyhas the entry, there is *no lookup time* (other than the dentry scanitself, but we can't avoid that anyway, and besides Linux dentriescream other OS's which don't have them:-). Furthermore, the number ofnode entries in a devfs is only the number of available deviceentries, not the number of *conceivable* entries. Even if you removeunnecessary entries in a disc-based /dev, the number of conceivableentries remains the same: you just limit yourself in order to savespace.Devfs provides a fast connection between a VFS node and the devicedriver, in a scalable way./dev as a system administration toolRight now /dev contains a list of conceivable devices, most of which Idon't have. Devfs only shows those devices available on mysystem. This means that listing /dev is a handy way of checking whatdevices are available.Major&minor sizeExisting major and minor numbers are limited to 8 bits each. This isnow a limiting factor for some drivers, particularly the SCSI discdriver, which consumes a single major number. Only 16 discs aresupported, and each disc may have only 15 partitions. Maybe this isn'ta problem for you, but some of us are building huge Linux systems withdisc arrays. With devfs an arbitrary pointer can be associated witheach device entry, which can be used to give an effective 32 bitdevice identifier (i.e. that's like having a 32 bit minornumber). Since this is private to the kernel, there are no C librarycompatibility issues which you would have with increasing major andminor number sizes. See the section on "Allocation of Device Numbers"for details on maintaining compatibility with userspace.Solving this requires a kernel change.Since writing this, the kernel has been modified so that the SCSI discdriver has more major numbers allocated to it and now supports up to128 discs. Since these major numbers are non-contiguous (a result ofunplanned expansion), the implementation is a little more cumbersomethan originally.Just like the changes to IPv4 to fix impending limitations in theaddress space, people find ways around the limitations. In the longrun, however, solutions like IPv6 or devfs can't be put off forever.Read-only root filesystemHaving your device nodes on the root filesystem means that you can'toperate properly with a read-only root filesystem. This is because youwant to change ownerships and protections of tty devices. Existingpractice prevents you using a CD-ROM as your root filesystem for a*real* system. Sure, you can boot off a CD-ROM, but you can't changetty ownerships, so it's only good for installing.Also, you can't use a shared NFS root filesystem for a cluster ofdiscless Linux machines (having tty ownerships changed on a common/dev is not good). Nor can you embed your root filesystem in aROM-FS.You can get around this by creating a RAMDISC at boot time, makingan ext2 filesystem in it, mounting it somewhere and copying thecontents of /dev into it, then unmounting it and mounting it over/dev.A devfs is a cleaner way of solving this.Non-Unix root filesystemNon-Unix filesystems (such as NTFS) can't be used for a rootfilesystem because they variously don't support character and blockspecial files or symbolic links. You can't have a separate disc-basedor RAMDISC-based filesystem mounted on /dev because you need devicenodes before you can mount these. Devfs can be mounted without anydevice nodes. Devlinks won't work because symlinks aren't supported.An alternative solution is to use initrd to mount a RAMDISC initialroot filesystem (which is populated with a minimal set of devicenodes), and then construct a new /dev in another RAMDISC, and finallyswitch to your non-Unix root filesystem. This requires clever bootscripts and a fragile and conceptually complex boot procedure.Devfs solves this in a robust and conceptually simple way.PTY security

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av在线一区二区| 欧美性猛交一区二区三区精品 | 国产黄色精品网站| 成人99免费视频| 555www色欧美视频| 欧美极品美女视频| 奇米色一区二区| 国产在线精品一区二区不卡了| 97se亚洲国产综合自在线不卡| 91精品一区二区三区久久久久久| 欧美大片拔萝卜| 亚洲精品老司机| 国产一区二区在线观看免费| 99精品视频在线播放观看| 欧美大白屁股肥臀xxxxxx| 中文字幕av资源一区| 亚洲精品乱码久久久久久日本蜜臀| 日韩电影网1区2区| 色婷婷一区二区| 国产丝袜欧美中文另类| 日韩二区在线观看| 69堂精品视频| 午夜精品久久久久久久蜜桃app| 色综合天天在线| 亚洲乱码国产乱码精品精的特点| 暴力调教一区二区三区| 一区在线观看免费| 精品视频999| 午夜一区二区三区视频| 在线播放/欧美激情| 精品一区二区影视| 国产精品欧美极品| 在线视频国内自拍亚洲视频| 亚洲精品视频在线看| 91女人视频在线观看| 亚洲最新视频在线播放| 欧美老肥妇做.爰bbww| 蜜乳av一区二区三区| 综合欧美一区二区三区| 欧美日本在线一区| 国产成人综合在线播放| 一区二区免费视频| 久久久久国产精品厨房| 欧洲精品中文字幕| 国产一区二区三区黄视频| 亚洲素人一区二区| 5566中文字幕一区二区电影| 播五月开心婷婷综合| 国产成人av电影免费在线观看| 日韩视频在线你懂得| 国内精品不卡在线| 亚洲欧洲综合另类在线| 国产亚洲一本大道中文在线| 欧美日韩亚洲另类| 99精品视频中文字幕| 久久国产生活片100| 日本一区中文字幕| 亚洲第一搞黄网站| 亚洲高清免费一级二级三级| 亚洲精品日韩一| 1024精品合集| 国产精品福利一区二区| 国产亚洲精久久久久久| 久久婷婷综合激情| 欧美精品一区男女天堂| 日韩免费性生活视频播放| 欧美系列一区二区| 在线观看不卡视频| 欧美性猛交xxxx乱大交退制版 | 婷婷久久综合九色国产成人| 一区二区三区精品在线观看| 国产精品网站在线播放| 欧美韩国日本不卡| 成人欧美一区二区三区1314| 一区二区在线观看免费视频播放 | 欧美激情一二三区| 欧美激情在线观看视频免费| 国产精品久久久久影院| 国产精品每日更新| 亚洲午夜在线观看视频在线| 日本成人在线网站| 狠狠v欧美v日韩v亚洲ⅴ| 成人精品国产一区二区4080| 91麻豆产精品久久久久久 | 国产xxx精品视频大全| 不卡的av网站| 91麻豆精品国产91久久久资源速度| 久久一日本道色综合| 亚洲精品一二三| 激情深爱一区二区| 欧美视频完全免费看| 国产亚洲精品免费| 日本亚洲最大的色成网站www| 国产精品一区二区黑丝| 欧美三级中文字| 亚洲色图欧美激情| 国产一区三区三区| 精品蜜桃在线看| 天涯成人国产亚洲精品一区av| 国产综合一区二区| 欧美mv和日韩mv的网站| 天使萌一区二区三区免费观看| av爱爱亚洲一区| 欧美一区二区三区喷汁尤物| 久久在线观看免费| 激情国产一区二区| 欧美电影免费观看高清完整版在 | 国产真实乱偷精品视频免| 91农村精品一区二区在线| 国产精品乱人伦一区二区| 久久成人免费网| 国产精品国产三级国产有无不卡 | 一区二区三区在线播| 欧美亚洲国产一区在线观看网站| 一区二区三区中文字幕| 欧美日韩二区三区| 成人一区二区视频| 免费人成在线不卡| 亚洲欧洲精品天堂一级 | 91麻豆精品在线观看| 亚洲成人tv网| 久久精品视频在线免费观看| av网站一区二区三区| 久久aⅴ国产欧美74aaa| 亚洲一卡二卡三卡四卡五卡| 精品国产凹凸成av人导航| 色婷婷av一区| 国产精品99久久久久久久女警 | 久久蜜桃av一区二区天堂| 欧美在线观看视频在线| 成人一区二区视频| 高清不卡一二三区| 国产精品一二三| 美腿丝袜亚洲一区| 蜜臀av性久久久久av蜜臀妖精| 国产精品色在线| 久久影院视频免费| 久久噜噜亚洲综合| 久久综合九色综合97_久久久| 3d动漫精品啪啪一区二区竹菊| 在线观看亚洲精品| 欧美系列亚洲系列| 欧美高清dvd| 欧美成人r级一区二区三区| 日韩一级片在线播放| 日韩欧美国产综合一区 | 成人黄色小视频| 99久久久国产精品| 欧美日韩中字一区| 日韩一级视频免费观看在线| 精品剧情v国产在线观看在线| 久久久精品人体av艺术| 亚洲精品乱码久久久久久黑人 | 亚洲国产综合人成综合网站| 免费人成精品欧美精品| 成人精品鲁一区一区二区| 成人性生交大片免费看视频在线 | 欧美午夜一区二区三区免费大片| 在线成人免费观看| 国产精品久久久久久久久久久免费看| 国产精品污www在线观看| 石原莉奈在线亚洲二区| 国产在线麻豆精品观看| 欧美专区在线观看一区| 久久久久国产成人精品亚洲午夜| 亚洲国产日韩精品| 91在线观看美女| 久久久久久久综合色一本| 亚洲精品成a人| 欧美亚洲丝袜传媒另类| 成人欧美一区二区三区| 成人福利视频网站| 国产精品素人视频| 激情成人午夜视频| 国产女人aaa级久久久级| 国产又黄又大久久| 欧美激情一区在线| 91天堂素人约啪| 一区二区三区四区高清精品免费观看| 91麻豆123| 精品亚洲porn| 亚洲小少妇裸体bbw| 国产日韩欧美一区二区三区乱码| 久久电影国产免费久久电影| 青椒成人免费视频| 国产精品免费网站在线观看| 国产.欧美.日韩| 日韩写真欧美这视频| 免费成人在线网站| 成人毛片在线观看| 亚洲男人天堂一区| 91精品国产综合久久福利| 丁香婷婷综合五月| 午夜精品福利一区二区三区av| 国产亚洲成av人在线观看导航| 色综合色狠狠综合色| 久久久久国产精品厨房| 激情综合网av| 欧美精三区欧美精三区| 亚洲精品视频免费看|