chen_chuang
    值得一提的是wq_calc_node_cpumask这个函数,这个函数会根据该node的cpu情况以及workqueue attribute中的cpumask成员来更新tmp_attrs->cpumask,因此,在pwq_tbl[node] = alloc_unbound_pwq(wq, tmp_attrs); 这行代码中,为该node分配pool workqueue对应的线程池的时候,去掉了本node中不存在的cpu。例如node 0中有CPU A和B,workqueue的attribute规定work只能在CPU A 和C上运行,那么创建node 0上的pool workqueue以及对应的worker thread pool的时候,需要删除CPU C,也就是说,node 0上的线程池的属性中的cpumask仅仅支持CPU A了。 ------------------------------------------------------------------------------------------------- 大神,关于wq_calc_node_cpumask()函数的疑问。先贴下代码的实现: static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node, int cpu_going_down, cpumask_t *cpumask) { if (!wq_numa_enabled || attrs->no_numa) goto use_dfl; /* does @node have any online CPUs @attrs wants? */ cpumask_and(cpumask, cpumask_of_node(node), attrs->cpumask); if (cpu_going_down >= 0) cpumask_clear_cpu(cpu_going_down, cpumask); if (cpumask_empty(cpumask)) goto use_dfl; /* yeap, return possible CPUs in @node that @attrs wants */ cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]); return !cpumask_equal(cpumask, attrs->cpumask); use_dfl: cpumask_copy(cpumask, attrs->cpumask); return false; } 我的理解是:假设node1有cpu0和cpu1,node2有cpu2和cpu3,那么wq_numa_possible_cpumask[1] = 0011, wq_numa_possible_cpumask[2] = 1100; 而如果unbound workqueue的work能在cpu0和cpu2上运行那这里的attr->cpumask即为0101,两者按位与后得出cpumask = 0001;这样的话cpumask_equal返回的值就为false了,但这样就直接走了dfl_pwq的分支了,感觉与您说的就不符了,不知道我哪理解错了
    tigger
    tlb参数里面都保存着什么?只是指向该translation talbe的内存吗?
    tigger
    hi linuxer 这个宏定义主要是用来创建一个中间level的translation table中的描述符 ============================================================== 那第一个level的translation table在哪里?放在TTBR0_ELX中吗? 如果是这样的话,第一level的translation table怎么找到你说的这个中间级别的?
    fexiahn
    @fexiahn:如果将从代码中/etc/passwd路径改为etc_us/passwd,那么修改用户名的密码时是不是要将/etc/shadow的路径一同修改,我最近在看这部分的资料,没有搞明白/etc/passwd和/etc/shadow之间的关系,麻烦wowo帮忙分析一下,谢谢
    Linux TTY framework(1)_基本概念  发表时间:2016-12-07 14:48
    fexiahn
    @wowo:@wowo,谢谢,您的文章写的确实不错的
    Linux TTY framework(1)_基本概念  发表时间:2016-12-07 14:39
    理查德1030
    hi,linuxer: request_irq()用irq:176,但在中断触发的时候确变成了184(下一个GPIO bank),导致irq_flow_handler_t获取寄存器地址到184对应的bank,两个gpio bank用同一硬件中断号75. |--(76)---pl061 A cpu----GIC-----| |-----bank 1, [176,+8] |--(75)---pl061 B----| |-----bank 2, [184,+8] 不知是在那个环节出问题了??? 1、注册分配过程: [pl061_probe:315] irq:75, irq_base:0 irq: irq_create_mapping(0xc8dd2c00, 0x0) irq: -> using domain @c8dd2c00 [__irq_alloc_descs:444] irq:-1, from:1, cnt:1, node:-1 [__irq_alloc_descs:477] start:176, from:1, cnt:1, nr_irqs:177 irq: irq 0 on domain /soc/amba/gpio@12146000 mapped to virtual irq 176 2、中断请求过程: [request_threaded_irq:1637] irq:176, retval:0 [pl061_irq_type;146] offset:0, trigger:8, chip.base:0xfea46000 [pl061_irq_unmask;241] irqd_to_hwirq:1, mask:1 3、中断低电平触发 [generic_handle_irq:353] hwirq:75, irq:75 [pl061_irq_handler:197] irq_base:184, gpio_base:448 [pl061_irq_handler:200] irq:75, GPIOMIS:0, GPIOIC:0 [pl061_irq_handler:201] chip->base:fea47000, GPIOIS:0, GPIOIE:0 [pl061_irq_handler:202] offset:0, GPIOIEV:0, GPIORIS:253 [pl061_irq_handler;211] irqnumber:184, offset:0, pending:0 /*pending手动置1后的进入high level handler */ [generic_handle_irq:352] irq:184, parent_irq:75 [generic_handle_irq:353] hwirq:0, irq:184 [handle_simple_irq;393] irq:184, desc->action: (null) 4、中断注册状态 ~ # cat /proc/interrupts CPU0 CPU1 29: 3425 1009 GIC 29 arch_timer ...... 96: 0 43018 GIC 96 timer 176: 0 0 pl061 0 GPIO IPI0: 0 0 CPU wakeup interrupts
    wowo
    @higari:不客气,要注意suspend的时候ram不能掉电,否则变量里面保存的东西会丢。 PS:作为一个嵌入式工程师,怎么允许busy loop(一直盯着博客么)呢?怎么说也要中断触发(邮件提醒),否则定时器查询(偶尔看一下)啊!哈哈~~
    linux内核中的GPIO系统之(1):软件框架  发表时间:2016-12-06 21:54
    higari
    @wowo:好的,谢谢啦。 另外,为什么你回复的那么快啊,一直盯着博客么
    linux内核中的GPIO系统之(1):软件框架  发表时间:2016-12-06 18:01
    wowo
    @wink:哈哈~~
    Linux common clock framework(2)_clock provider  发表时间:2016-12-06 17:04
    wowo
    @higari:应该没有问题。
    linux内核中的GPIO系统之(1):软件框架  发表时间:2016-12-06 17:03

共7862条345/787上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 下一页
Copyright @ 2013-2015 蜗窝科技 All rights reserved. Powered by emlog