- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- buf->b_pcnt field
Operating System - HP-UX
1753797
Members
7626
Online
108805
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2004 08:31 AM
11-29-2004 08:31 AM
buf->b_pcnt field
Hello,
I have partly decoded biodone() routine, it appears to be that a wakeup is called in the routine when *buf->b_pcnt <= 0, the comment
in buf.h says, "int *b_pcnt; /* decr in biodone(), wakeup on < 0
*/"
Please see the next few lines of assemble and my C source code reconstruction.
%r3 contains bp
(kwdb 0:0) q4 fields -hex struct buf |grep b_pcnt
0X108 0 8 0 * b_pcnt
%r26 (arg0) contains bp
0x12fef8: ldd 0x108(%r3),%r26
call get_sleep_lock(bp)
0x12fefc: call 0x153470
//store the return value of the call in the stack
0x12ff00: ldo -0x30(%sp),%ret1
0x12ff04: std %ret0,-0xa0(%sp)
%r3 contains bp
load bp->b_pcnt to %r22
0x12ff08: ldd 0x108(%r3),%r22
load *bp->b_pcnt to %rp
0x12ff0c: ldw 0(%r22),%rp
(*bp->b_pcnt)--;
0x12ff10: ldo -1(%rp),%r1
0x12ff14: stw %r1,0(%r22)
if ((*bp->b_pcnt) > 0) {
jump to biodone+0x200
}
0x12ff18: cmpb,<,n %r0,%r1,0x12ff90
load %r26 with bp->b_pcnt
0x12ff1c: ldd 0x108(%r3),%r26
call wakeup (bp->b_pcnt);
0x12ff20: call 0x153aa0
0x12ff24: ldo -0x30(%sp),%ret1
bp->b_pcnt = NULL;
0x12ff28: std %r0,0x108(%r3)
...........
QUESTION:: Where can I get more information on
bp->b_pcnt? Looks like that the IOs are related together if b_pcnt is set. For the last IO issue an wakeup. Anyway, who issues this type of IOs?
Kallol
I have partly decoded biodone() routine, it appears to be that a wakeup is called in the routine when *buf->b_pcnt <= 0, the comment
in buf.h says, "int *b_pcnt; /* decr in biodone(), wakeup on < 0
*/"
Please see the next few lines of assemble and my C source code reconstruction.
%r3 contains bp
(kwdb 0:0) q4 fields -hex struct buf |grep b_pcnt
0X108 0 8 0 * b_pcnt
%r26 (arg0) contains bp
0x12fef8
call get_sleep_lock(bp)
0x12fefc
//store the return value of the call in the stack
0x12ff00
0x12ff04
%r3 contains bp
load bp->b_pcnt to %r22
0x12ff08
load *bp->b_pcnt to %rp
0x12ff0c
(*bp->b_pcnt)--;
0x12ff10
0x12ff14
if ((*bp->b_pcnt) > 0) {
jump to biodone+0x200
}
0x12ff18
load %r26 with bp->b_pcnt
0x12ff1c
call wakeup (bp->b_pcnt);
0x12ff20
0x12ff24
bp->b_pcnt = NULL;
0x12ff28
...........
QUESTION:: Where can I get more information on
bp->b_pcnt? Looks like that the IOs are related together if b_pcnt is set. For the last IO issue an wakeup. Anyway, who issues this type of IOs?
Kallol
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP