I'm sponsoring this on behalf of Christopher Baumbauer. Exposure is open, seeking patch binding. Timeout set for 04/03/2009.
- Dan Template Version: @(#)onepager.txt 1.35 07/11/07 SMI Copyright 2007 Sun Microsystems Sun Proprietary/Confidential: Internal Use Only: Engineering Need-to-Know 1. Introduction 1.1. Project/Component Working Name: Page Retirement Kernel KStat Addition 1.2. Name of Document Author/Supplier: Author: Chris Baumbauer 1.3. Date of This Document: 03/16/2008 1.3.1. Date this project was conceived: 03/16/2008 1.4. Name of Major Document Customer(s)/Consumer(s): 1.4.1. The PAC or CPT you expect to review your project: Solaris PAC 1.4.2. The ARC(s) you expect to review your project: PSARC 1.4.3. The Director/VP who is "Sponsoring" this project: brian.reynard at sun.com 1.4.4. The name of your business unit: Solaris RPE Platform-Kernel 1.5. Email Aliases: 1.5.1. Responsible Manager: ken.yan at sun.com 1.5.2. Responsible Engineer: christopher.baumbauer at sun.com 1.5.3. Marketing Manager: 1.5.4. Interest List: 2. Project Summary 2.1. Project Description: Provide a new kstat to indicate when a page of kernel memory is slated for retirement. 2.2. Risks and Assumptions: The addition of a new kstat may not get picked up by various debugging and diagnostic tools. 3. Business Summary 3.1. Problem Area: Customer experiences a nasty performance hit whenever the pagelock cache is disabled, and in the case mentioned during the technical description, the pagelock cache continuously gets disabled when it shouldn't. 3.2. Market/Requester: 3.3. Business Justification: 3.4. Competitive Analysis: 3.5. Opportunity Window/Exposure: 3.6. How will you know when you are done?: 4. Technical Description: 4.1. Details: The implementation is a part of a fix with page retirement where the new kstat will be used to differentiate pages slated for retirement. Since a kernel page will be locked throughout its lifetime, if it is slated for retirement, the page will first find its way into a page retirement pending queue (S10) or a page capture hash bucket (Nevada) and then increment a kstat to indicate that a page is waiting to be retired. Then a background thread (page_retire_thread in S10 or page_capture_thread in Nevada) will check the pending kstat to see if there is any work to do, go through the queue or hash, and attempt to unlock the page in an effort to to induce a retirement. In the case of kernel pages, they are always locked and will thus not undergo retirement, but still force the page retirement thread to run and attempt to cleanup the page while negatively impacting system performance by unneccarily disabling the pagelock cache. Also, since the kernel page has been marked for retirement, they will need to be scrubbed on reboot to prevent possible future issues on the next boot. Adding a new kstat that specifically tracks kernel pages placed in the respective pending location will allow the page retirement system to pull kernel pages out of circulation while still permit their cleanup on reboot. A kernel page retirement example: # ./prt_sparc Welcome to page_retire_test (PRT). 'h' for Help. prt> M0x23f406000 ITER 0: badpa 0 busy 0 again 1 not 0 ok 0 ----- prt> k module: unix instance: 0 name: page_retire class: misc crtime 73.371403096 pages_deferred 1 pages_deferred_kernel 0 pages_fma 0 pages_limit 514 pages_limit_exceeded 0 pages_multiple_ce 0 pages_notdequeued 0 pages_notenqueued 0 pages_pending 0 pages_pending_kas 1 pages_retire_request 0 pages_retire_request_free 0 pages_retired 0 pages_ue 0 pages_ue_cleared_freed 0 pages_ue_cleared_retired 0 pages_ue_persistent 0 pages_unretired 0 snaptime 302.701530127 prt> ^D # mdb -k Loading modules: [ unix genunix specfs dtrace ufs pcisch sd ip hook neti sctp arp usba fctl nca lofs zfs cpc random fcip ptm sppp nfs ] > pr_pending_q::print [ 0x70001fd0180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] > 0x70001fd0180::print page_t { p_offset = 0x3000c406000 p_vnode = kvp p_selock = 0 p_vpmref = 0 p_hash = 0 p_vpnext = 0x70001fd0100 p_vpprev = 0x70001fd0200 p_next = 0x70001fd0180 p_prev = 0x70001fd0180 p_lckcnt = 0x1 p_cowcnt = 0 p_cv = { _opaque = 0 } p_io_cv = { _opaque = 0 } p_iolock_state = 0 p_szc = 0x3 p_fsdata = 0 p_state = 0 p_nrm = 0 p_vcolor = 0x2 p_index = 0x8 p_toxic = 0x41 ... 4.2. Bug/RFE Number(s): CR 6587140 4.3. In Scope: 4.4. Out of Scope: 4.5. Interfaces: New kstat variable (pr_pending_kas) which will be used in addition to pr_pending to track the number of pages awaiting retirement. 4.6. Doc Impact: 4.7. Admin/Config Impact: Programs and scripts that make use of the page_retirement kstats in general, and the pr_pending kstat in particular. 4.8. HA Impact: 4.9. I18N/L10N Impact: 4.10. Packaging & Delivery: 4.11. Security Impact: 4.12. Dependencies: 5. Reference Documents: CR 6587140 6. Resources and Schedule: 6.1. Projected Availability: 6.2. Cost of Effort: 6.3. Cost of Capital Resources: 6.4. Product Approval Committee requested information: 6.4.1. Consolidation or Component Name: 6.4.3. Type of CPT Review and Approval expected: FastTrack 6.4.4. Project Boundary Conditions: 6.4.5. Is this a necessary project for OEM agreements: no 6.4.6. Notes: 6.4.7. Target RTI Date/Release: Nevada: snv_112 S10: S10u8_1 6.4.8. Target Code Design Review Date: 6.4.9. Update approval addition: 6.5. ARC review type: Fasttrack 6.6. ARC Exposure: open 6.6.1. Rationale: 7. Prototype Availability: 7.1. Prototype Availability: 7.2. Prototype Cost: