一般將apci表中的資訊存到kernel的中後好釋放acpi表占用的記憶體。
一般呼叫early_acpi_os_unmap_memory((char *)table_header, tbl_size);
輸入引數是這個acpi的都指標和size
void __init early_acpi_os_unmap_memory(void __iomem *virt, acpi_size size)
在kernel中如果acpi_gbl_permanent_mmap不等於0,則不釋放acpi占用的memory
void __init __acpi_unmap_table(char *map, unsigned long size)
繼續呼叫early_iounmap
void __init early_iounmap(void __iomem *addr, unsigned long size)
}if (warn(slot < 0, "early_iounmap(%p, %08lx) not found slot\n",
addr, size))
return;
if (warn(prev_size[slot] != size,
"early_iounmap(%p, %08lx) [%d] size not consistent %08lx\n",
addr, size, slot, prev_size[slot]))
return;
warn(early_ioremap_debug, "early_iounmap(%p, %08lx) [%d]\n",
addr, size, slot);
virt_addr = (unsigned long)addr;
if (warn_on(virt_addr < fix_to_virt(fix_btmap_begin)))
return;
offset = offset_in_page(virt_addr);
nrpages = page_align(offset + size) >> page_shift;
idx = fix_btmap_begin - nr_fix_btmaps*slot;
while (nrpages > 0)
prev_map[slot] = null;
}我們先看after_paging_init == 1的case
#define __late_clear_fixmap(idx) __set_fixmap(idx, 0, __pgprot(0))
static inline void __set_fixmap(enum fixed_addresses idx,
phys_addr_t phys, pgprot_t flags)
void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
set_pte_vaddr(address, pte);
fixmaps_set++;
}最終就是將idx表示的位址設定成__pgprot(0),也就是clean pte
而paging_init前
void __init __early_set_fixmap(enum fixed_addresses idx,
phys_addr_t phys, pgprot_t flags)
pte = early_ioremap_pte(addr);
if (pgprot_val(flags))
set_pte(pte, pfn_pte(phys >> page_shift, flags));
else
pte_clear(&init_mm, addr, pte);
__flush_tlb_one(addr);
}就是直接clean pte.
鍊錶的建立 插入 刪除 釋入
include include struct chain 建立新鍊錶 struct chain create return head 加入新的節點 struct chain insert struct chain head,struct chain s 如果鍊錶迴圈到結尾 if p next nul...
LOBSEGMENT 占用很大的表空問題問題
今天連到資料庫上,發現表空間被占用了很多,發現有乙個檔案sys lob0000006213c00038 占用14g,然後用下面的命令查了一下 select a.table name,a.column name,b.segment name,b.segment type,b.tablespace na...
檢視某個表被誰占用的SQL語句
select v session.sid,dba objects.object name,v session.osuser,v session.program,v session.machine,v session.sql exec start,v session.logon time from v...