----- Original Message -----
Hi Dave, et al.,
Having hacked my way around the self-sabotage on the temp file:
> #define mWARN( _m, _a...) do { \
> FILE * _sv_fp = fp; \
> fp = stdout; \
> error(WARNING, _m, ##_a); \
> fp = _sv_fp; \
> } while (0)
That also removed the mysterious problem of having a duplicate error
message show up on the console.
OK, if that works for you...
As I mentioned before, the mysterious duplicate to stdout comes from
the else part of the if-else above the code segment you showed, and
is intended.
My next problem is that I seem to be getting inconsistencies between
the data I can print and the data I can find mapping information
about:
> crash> gdb set $tp = (struct cfs_trace_page *)0xffff8807fb590740
> crash> p $tp->page
> $7 = (cfs_page_t *) 0xffffea001bb1d1e8
> crash> p *$tp->page
> $8 = {
> flags = 144115188075855872,
> _count = {
> counter = 1
> },
> [...]
> lru = {
> next = 0xdead000000100100,
> prev = 0xdead000000200200
> }
> }
> crash> kmem 0xffffea001bb1d1e8
> kmem: WARNING: cannot find mem_map page for address: ffffea001bb1d1e8
> 879b1d1e8: kernel virtual address not found in mem map
So I can print out the page_t structure (renamed as cfs_page_t in Lustre)
at address 0xffff8807fb590740, but when I try to get kmem information about
it, it cannot find the page. What am I missing?
Thanks for hints/pointers! Regards, Bruce
I'm not sure, other than it doesn't seem to be able to find ffffea001bb1d1e8
in the ranges of virtual memmap regions used to map page structures. I tried
to reproduce it using a vmemmap address known to be beyond the end of the mapped
pages, but I get a different message:
crash> kmem -p | tail
ffffea00087ffd80 21fff6000 0 0 0 0
ffffea00087ffdc0 21fff7000 0 0 0 0
ffffea00087ffe00 21fff8000 0 0 0 0
ffffea00087ffe40 21fff9000 0 0 0 0
ffffea00087ffe80 21fffa000 0 0 0 0
ffffea00087ffec0 21fffb000 0 0 0 0
ffffea00087fff00 21fffc000 0 0 0 0
ffffea00087fff40 21fffd000 0 0 0 0
ffffea00087fff80 21fffe000 0 0 0 0
ffffea00087fffc0 21ffff000 0 0 0 0
crash> kmem ffffea00087fffc0
PAGE PHYSICAL MAPPING INDEX CNT FLAGS
ffffea00087fffc0 21ffff000 0 0 0 0
crash> kmem ffffea0008800000
kmem: WARNING: cannot make virtual-to-physical translation: ffffea0008800000
ffffea0008800000: kernel virtual address not found in mem map
crash>
Is ffffea001bb1d1e8 beyond the end of your "kmem -p" output?
If not, the "kmem -n" command shows each (virtually contiguous) memmap region
starting address under the MEM_MAP column:
crash> kmem -n
NODE SIZE PGLIST_DATA BOOTMEM_DATA NODE_ZONES
0 2221552 ffff88021e5ec000 ---- ffff88021e5ec000
ffff88021e5ec6c0
ffff88021e5ecd80
ffff88021e5ed440
MEM_MAP START_PADDR START_MAPNR
ffffea0000000400 10000 16
ZONE NAME SIZE MEM_MAP START_PADDR START_MAPNR
0 DMA 4080 ffffea0000000400 10000 16
1 DMA32 1044480 ffffea0000040000 1000000 4096
2 Normal 1172992 ffffea0004000000 100000000 1048576
3 Movable 0 0 0 0
-------------------------------------------------------------------
NR SECTION CODED_MEM_MAP MEM_MAP PFN
0 ffff88021e5eb000 ffffea0000000000 ffffea0000000000 0
1 ffff88021e5eb020 ffffea0000000000 ffffea0000200000 32768
2 ffff88021e5eb040 ffffea0000000000 ffffea0000400000 65536
3 ffff88021e5eb060 ffffea0000000000 ffffea0000600000 98304
4 ffff88021e5eb080 ffffea0000000000 ffffea0000800000 131072
5 ffff88021e5eb0a0 ffffea0000000000 ffffea0000a00000 163840
6 ffff88021e5eb0c0 ffffea0000000000 ffffea0000c00000 196608
7 ffff88021e5eb0e0 ffffea0000000000 ffffea0000e00000 229376
8 ffff88021e5eb100 ffffea0000000000 ffffea0001000000 262144
9 ffff88021e5eb120 ffffea0000000000 ffffea0001200000 294912
10 ffff88021e5eb140 ffffea0000000000 ffffea0001400000 327680
11 ffff88021e5eb160 ffffea0000000000 ffffea0001600000 360448
12 ffff88021e5eb180 ffffea0000000000 ffffea0001800000 393216
13 ffff88021e5eb1a0 ffffea0000000000 ffffea0001a00000 425984
14 ffff88021e5eb1c0 ffffea0000000000 ffffea0001c00000 458752
15 ffff88021e5eb1e0 ffffea0000000000 ffffea0001e00000 491520
16 ffff88021e5eb200 ffffea0000000000 ffffea0002000000 524288
17 ffff88021e5eb220 ffffea0000000000 ffffea0002200000 557056
18 ffff88021e5eb240 ffffea0000000000 ffffea0002400000 589824
19 ffff88021e5eb260 ffffea0000000000 ffffea0002600000 622592
20 ffff88021e5eb280 ffffea0000000000 ffffea0002800000 655360
21 ffff88021e5eb2a0 ffffea0000000000 ffffea0002a00000 688128
22 ffff88021e5eb2c0 ffffea0000000000 ffffea0002c00000 720896
23 ffff88021e5eb2e0 ffffea0000000000 ffffea0002e00000 753664
24 ffff88021e5eb300 ffffea0000000000 ffffea0003000000 786432
25 ffff88021e5eb320 ffffea0000000000 ffffea0003200000 819200
26 ffff88021e5eb340 ffffea0000000000 ffffea0003400000 851968
32 ffff88021e5eb400 ffffea0000000000 ffffea0004000000 1048576
33 ffff88021e5eb420 ffffea0000000000 ffffea0004200000 1081344
34 ffff88021e5eb440 ffffea0000000000 ffffea0004400000 1114112
35 ffff88021e5eb460 ffffea0000000000 ffffea0004600000 1146880
36 ffff88021e5eb480 ffffea0000000000 ffffea0004800000 1179648
37 ffff88021e5eb4a0 ffffea0000000000 ffffea0004a00000 1212416
38 ffff88021e5eb4c0 ffffea0000000000 ffffea0004c00000 1245184
39 ffff88021e5eb4e0 ffffea0000000000 ffffea0004e00000 1277952
40 ffff88021e5eb500 ffffea0000000000 ffffea0005000000 1310720
41 ffff88021e5eb520 ffffea0000000000 ffffea0005200000 1343488
42 ffff88021e5eb540 ffffea0000000000 ffffea0005400000 1376256
43 ffff88021e5eb560 ffffea0000000000 ffffea0005600000 1409024
44 ffff88021e5eb580 ffffea0000000000 ffffea0005800000 1441792
45 ffff88021e5eb5a0 ffffea0000000000 ffffea0005a00000 1474560
46 ffff88021e5eb5c0 ffffea0000000000 ffffea0005c00000 1507328
47 ffff88021e5eb5e0 ffffea0000000000 ffffea0005e00000 1540096
48 ffff88021e5eb600 ffffea0000000000 ffffea0006000000 1572864
49 ffff88021e5eb620 ffffea0000000000 ffffea0006200000 1605632
50 ffff88021e5eb640 ffffea0000000000 ffffea0006400000 1638400
51 ffff88021e5eb660 ffffea0000000000 ffffea0006600000 1671168
52 ffff88021e5eb680 ffffea0000000000 ffffea0006800000 1703936
53 ffff88021e5eb6a0 ffffea0000000000 ffffea0006a00000 1736704
54 ffff88021e5eb6c0 ffffea0000000000 ffffea0006c00000 1769472
55 ffff88021e5eb6e0 ffffea0000000000 ffffea0006e00000 1802240
56 ffff88021e5eb700 ffffea0000000000 ffffea0007000000 1835008
57 ffff88021e5eb720 ffffea0000000000 ffffea0007200000 1867776
58 ffff88021e5eb740 ffffea0000000000 ffffea0007400000 1900544
59 ffff88021e5eb760 ffffea0000000000 ffffea0007600000 1933312
60 ffff88021e5eb780 ffffea0000000000 ffffea0007800000 1966080
61 ffff88021e5eb7a0 ffffea0000000000 ffffea0007a00000 1998848
62 ffff88021e5eb7c0 ffffea0000000000 ffffea0007c00000 2031616
63 ffff88021e5eb7e0 ffffea0000000000 ffffea0007e00000 2064384
64 ffff88021e5eb800 ffffea0000000000 ffffea0008000000 2097152
65 ffff88021e5eb820 ffffea0000000000 ffffea0008200000 2129920
66 ffff88021e5eb840 ffffea0000000000 ffffea0008400000 2162688
67 ffff88021e5eb860 ffffea0000000000 ffffea0008600000 2195456
crash>
Is your address contained with one of your regions?
Dave