Hi,
Pls help review uadk scheduler proposal
More info 【腾讯文档】uadk scheduler proposal https://docs.qq.com/doc/DRWxHeEFpVm9qVHJa
workers。","range":{"gcpBegin":409,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":409,"len":55},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":464,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":464,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":464,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"scheduler驱动接管所有ops,再根据policy,分发给workers。","range":{"gcpBegin":465,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":465,"len":40},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":505,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":505,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":505,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"最简单是直接转发给默认worker,当worker_num=1,忽略policy.","range":{"gcpBegin":506,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":506,"len":41},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":547,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":547,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":547,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"alloc_scheduler(default_worker)传默认worker, 后续再解析环境变量,config文件或者参数传递,增加其他worker。","range":{"gcpBegin":548,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":548,"len":78},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":626,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":626,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":626,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"加速器驱动不用主动注册到uadk,因为需要dlopen->probe,parse scheduler worker参数的时候再解析,类似qemu,","range":{"gcpBegin":627,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":627,"len":73},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":700,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":700,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":700,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{"bottom":{}},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":701,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":701,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":701,"len":1},"property":{"pStyle":{"val":"ablt93"},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"before: app -> crypto/compress api -> ops -> driver ops","range":{"gcpBegin":702,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":702,"len":56},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":758,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":758,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":758,"len":1},"property":{"numPr":{},"snapToGrid":{"val":true},"spacing":{"line":240}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"now: app -> crypto/compress api -> ops -> scheduler ops -> policy -> driver a ops","range":{"gcpBegin":759,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":759,"len":81},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":840,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":840,"len":1},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":840,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\t\t\t\t\t\t\t\t\t\t\t\t\t -> driver b ops","range":{"gcpBegin":841,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":841,"len":34},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":875,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":875,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":875,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":876,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":876,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":876,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\b","range":{"gcpBegin":877,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":877,"len":1},"property":{"isPlaceholder":true,"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyDrawingProp","param":{"range":{"gcpBegin":877,"len":1},"property":{"anchor":{"positionV":{}},"inlineKeyword":{"extent":{"cx":5760085,"cy":2893234},"effectExtent":{"l":0,"t":0,"r":0,"b":0},"docPr":{"id":"9e5bb0c6","name":"picture","descr":"descript"},"cNvGraphicFramePr":{"graphicFrameLocks":{}},"graphic":{"graphicData":{"pic":{"nvPicPr":{"cNvPr":{"id":"1541","name":"picture","descr":"descript"},"cNvPicPr":{}},"blipFill":{"blip":{"embed":"https://docimg1.docs.qq.com/image/AgAABnWTPCRSnHZANKZD5Ivygu3e9OVX.png?w=131..." data-version="3.0.0" data-hash="f4b78a37065c67af61f432e7019a7b2f">
Background
uadk targets to support more accelerators, including cpu instruction (isa ce and isa sve) and other vendors.
Required from Fanghao
Goal
1. How to support these accelerators in the uadk framework, now uadk only support HiSilicon accelerator.
2. How to switch between these accelerators to get full performance.
Proposal
大概的想法,参考dpdk
1. scheduler也是一个驱动,采用同样的驱动接口ops
2. 必选的驱动,buildin,简化动态加载
3. 该驱动权限更高,接管所有ops,
4. scheduler驱动可带多个workers, 即真正的加速器驱动,scheduler -> workers。
5. scheduler驱动接管所有ops,再根据policy,分发给workers。
6. 最简单是直接转发给默认worker,当worker_num=1,忽略policy.
7. alloc_scheduler(default_worker)传默认worker, 后续再解析环境变量,config文件或者参数传递,增加其他worker。
8. 加速器驱动不用主动注册到uadk,因为需要dlopen->probe,parse scheduler worker参数的时候再解析,类似qemu,
before: app -> crypto/compress api -> ops -> driver ops
now: app -> crypto/compress api -> ops -> scheduler ops -> policy -> driver a ops
-> driver b ops
adapter","range":{"gcpBegin":4,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":4,"len":21},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"SettingOperation","param":{"property":{"abstractNum":{"bgss1a":{"abstractNumId":"bgss1a","lvl":{"0":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%1."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":336,"hanging":336}},"rPr":{"rFonts":{}},"ilvl":0},"1":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%2."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":776,"hanging":336}},"ilvl":1,"rPr":{"rFonts":{}}},"2":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%3."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1216,"hanging":336}},"ilvl":2,"rPr":{"rFonts":{}}},"3":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%4."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1656,"hanging":336}},"ilvl":3,"rPr":{"rFonts":{}}},"4":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%5."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2096,"hanging":336}},"ilvl":4,"rPr":{"rFonts":{}}},"5":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%6."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2536,"hanging":336}},"ilvl":5,"rPr":{"rFonts":{}}},"6":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%7."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2976,"hanging":336}},"ilvl":6,"rPr":{"rFonts":{}}},"7":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%8."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3416,"hanging":336}},"ilvl":7,"rPr":{"rFonts":{}}},"8":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%9."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3856,"hanging":336}},"ilvl":8,"rPr":{"rFonts":{}}}},"lvl_dict_op":{"opType":"Update"}}},"abstractNum_dict_op":{"opType":"Update"},"num":{"uok3bl":{"abstractNumId":{"val":"bgss1a"},"numId":"uok3bl"}},"num_dict_op":{"opType":"Update"}},"settingType":"numbering"},"propertyType":"NumberingProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":25,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":25,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":25,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"shengyang: request_ctx, 没有加速器会失败,用户程序忽略错误,用户程序看下。","range":{"gcpBegin":26,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":26,"len":49},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":75,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":75,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":75,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"wd_xxx_init->alloc_sheduler时需要缺省worker, 如何定,直接hardcode,或者wd_xxx_init解析环境?","range":{"gcpBegin":76,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":76,"len":73},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":149,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":149,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":149,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"alloc_scheduler woker[8] 简单用数组,还是链表之类,不限制个数","range":{"gcpBegin":150,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":150,"len":43},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":193,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":193,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":193,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"worker相同是否要支持。","range":{"gcpBegin":194,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":194,"len":14},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":208,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":208,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":208,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""}],"subStory":[],"srcGlobalPadId":"300000000$ElGxAiVojTrZ","copyStart":2292}" data-version="3.0.0" data-hash="6a0b89629c5baee33b29d681d3ded575">
TBD
1. longfang, 名字->adapter
2. shengyang: request_ctx, 没有加速器会失败,用户程序忽略错误,用户程序看下。
3. wd_xxx_init->alloc_sheduler时需要缺省worker, 如何定,直接hardcode,或者wd_xxx_init解析环境?
4. alloc_scheduler woker[8] 简单用数组,还是链表之类,不限制个数
5. worker相同是否要支持。
alloc_scheduler","range":{"gcpBegin":513,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":513,"len":30},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":543,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":543,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":543,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776,"leftChars_i":true},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":544,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":544,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":544,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776},"taskPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"为简化, worker 暂时只增加不减少,初始化的时候,parse条件,一步到位,","range":{"gcpBegin":545,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":545,"len":41},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":586,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":586,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":586,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"0tju7e"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"先不考虑动态减少worker的情况。后面看情况","range":{"gcpBegin":587,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":587,"len":23},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":610,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":610,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":610,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":0,"firstLineChars":200},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":611,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":611,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":611,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776},"taskPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"为简化,暂时不提供动态修改参数的api,诸如threshold.","range":{"gcpBegin":612,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":612,"len":32},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":644,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":644,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":644,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"0tju7e"}},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":645,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":645,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":645,"len":1},"property":{"pStyle":{"val":"ablt93"},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"Example:","range":{"gcpBegin":646,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":646,"len":8},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":654,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":654,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":654,"len":1},"property":{"pStyle":{"val":"bdfjvo"},"pBdr":{},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"heading 3"},{"operationType":"InsertText","param":{"text":"参数传递","range":{"gcpBegin":655,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":655,"len":4},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"SettingOperation","param":{"property":{"abstractNum":{"wvis5d":{"abstractNumId":"wvis5d","lvl":{"0":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%1."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":336,"hanging":336}},"rPr":{},"ilvl":0},"1":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%2."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":776,"hanging":336}},"ilvl":1},"2":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%3."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1216,"hanging":336}},"ilvl":2},"3":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%4."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1656,"hanging":336}},"ilvl":3},"4":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%5."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2096,"hanging":336}},"ilvl":4},"5":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%6."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2536,"hanging":336}},"ilvl":5},"6":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%7."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2976,"hanging":336}},"ilvl":6},"7":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%8."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3416,"hanging":336}},"ilvl":7},"8":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%9."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3856,"hanging":336}},"ilvl":8}},"lvl_dict_op":{"opType":"Update"}}},"abstractNum_dict_op":{"opType":"Update"},"num":{"nrbh2k":{"abstractNumId":{"val":"wvis5d"},"numId":"nrbh2k"}},"num_dict_op":{"opType":"Update"}},"settingType":"numbering"},"propertyType":"NumberingProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":659,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":659,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":659,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"nrbh2k"}},"pBdr":{},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"... --vdev "crypto_aesni_mb0,name=aesni_mb_1" --vdev "crypto_aesni_mb1,name=aesni_mb_2" --vdev "crypto_scheduler,worker=aesni_mb_1,worker=aesni_mb_2" ...","range":{"gcpBegin":660,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":660,"len":153},"property":{"rFonts":{"ascii":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","hAnsi":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","eastAsia":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","cs":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace"},"i":{"val":false},"strike":{"val":false},"color":{"val":"888888"},"sz":{"val":180},"u":{"val":"STUnderline_none"},"shd":{"val":"STShd_clear","color":"STHexColorAuto_auto","fill":"F8F8F8"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":813,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":813,"len":1},"property":{"rFonts":{"ascii":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","hAnsi":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","eastAsia":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace","cs":"SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace"},"i":{"val":false},"strike":{"val":false},"color":{"val":"888888"},"sz":{"val":180},"u":{"val":"STUnderline_none"},"shd":{"val":"STShd_clear","color":"STHexColorAuto_auto","fill":"F8F8F8"},"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":813,"len":1},"property":{"numPr":{},"pBdr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""}],"subStory":[],"srcGlobalPadId":"300000000$ElGxAiVojTrZ","copyStart":4718}" data-version="3.0.0" data-hash="03cbb5d001222496f5029b26b3fd3d59">
Advantage
no big uapi change
required one api for setting para. (env, conf, para setting)
Disadvantage / Limitation
1. 要求前提:所有驱动ops相同, comp, crypto,未来指令加速驱动?
struct wd_alg_driver {
const char *drv_name;
const char *alg_name;
~
int (*init)(void *conf, void *priv);
void (*exit)(void *priv);
int (*send)(handle_t ctx, void *drv_msg);
int (*recv)(handle_t ctx, void *drv_msg);
int (*get_usage)(void *param);
};
2. 一种算法,一个scheduler? (可以多个woker/driver)
wd_xxx_init -> alloc_scheduler
3. 为简化, worker 暂时只增加不减少,初始化的时候,parse条件,一步到位,
先不考虑动态减少worker的情况。后面看情况
4. 为简化,暂时不提供动态修改参数的api,诸如threshold.
Example:
1. 参数传递
... --vdev "crypto_aesni_mb0,name=aesni_mb_1" --vdev "crypto_aesni_mb1,name=aesni_mb_2" --vdev "crypto_scheduler,worker=aesni_mb_1,worker=aesni_mb_2" ...