synchronized access to lookaside list

Do I need to use a lock to synchronize access to a lookaside list initialized using ExInitializeNPagedLookasideList and subsequently accessed using ExAllocateFromNPagedLookasideList and ExFreeToNPagedLookasideList?

MSDN says: ExInitializeNPagedLookasideList Initializes a system spin lock to control allocations from and frees to the lookaside list in a multiprocessor-safe manner if necessary.

I was wondering how does it know that synchronized access is required as there is no argument to the function indicating that?

Thanks.

I would think the kernel knows if it is running on a multi-processor system.
With older versions of Windows such as XP, there were separate kernels for
UP and SMP systems. With Vista and later (also for earlier checked
versions) there is only a SMP version. The code may have been optimized to
avoid spinlocks if only one processor under Vista when they decided to only
use one kernel per bitness/CPU type. That is up to 6 in any case and
doubling to 12 seems unwieldy and almost impossible for users to know which
kernel was installed. We know to use the install text file that tells us,
but most users wouldn’t know how.

wrote in message news:xxxxx@ntdev…
> Do I need to use a lock to synchronize access to a lookaside list
> initialized using ExInitializeNPagedLookasideList and subsequently
> accessed using ExAllocateFromNPagedLookasideList and
> ExFreeToNPagedLookasideList?
>
> MSDN says: ExInitializeNPagedLookasideList Initializes a system spin lock
> to control allocations from and frees to the lookaside list in a
> multiprocessor-safe manner if necessary.
>
> I was wondering how does it know that synchronized access is required as
> there is no argument to the function indicating that?
>
> Thanks.
>

No, you do not need to synchronize allocs and frees to a lookaside list. You should be initializing the lookaside in init path where it will not be called while allocs and frees to the list are occurring.
d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@yahoo.com
Sent: Monday, November 03, 2008 6:10 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] synchronized access to lookaside list

Do I need to use a lock to synchronize access to a lookaside list initialized using ExInitializeNPagedLookasideList and subsequently accessed using ExAllocateFromNPagedLookasideList and ExFreeToNPagedLookasideList?

MSDN says: ExInitializeNPagedLookasideList Initializes a system spin lock to control allocations from and frees to the lookaside list in a multiprocessor-safe manner if necessary.

I was wondering how does it know that synchronized access is required as there is no argument to the function indicating that?

Thanks.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer