Locking around kmem_cache_destroy


 
Thread Tools Search this Thread
Operating Systems Linux Locking around kmem_cache_destroy
# 1  
Old 03-20-2008
Locking around kmem_cache_destroy

Hi There,

I want to make sure that kmem_cache_alloc is not called concurrently with kmem_cache_destroy on module exit and I want be able to use GFP_KERNEL for the kmem_cache_alloc calls.

Would a read/write lock be good fro this purpose or is there another method I should be using?

Regards,
Brendan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Locking Down SFTP

Hi List, I'm sure this has been done before and there must be several ways to skin the cat on this topic. What I am trying to achieve is set up user accounts for use with SFTP based on the standard OpenSSH protocol. And I want to be able to lock them down so that they cannot browse outside of... (2 Replies)
Discussion started by: landossa
2 Replies

2. UNIX for Advanced & Expert Users

File locking

i am working on a device runnin on linux....i have configured the samba server in the device such that my windows PC can access a shared folder in the device. Also in the device i am runnin some programs which access the files in this shared folder. What i want to know is whether there is any way i... (1 Reply)
Discussion started by: abhinx
1 Replies

3. Shell Programming and Scripting

Locking a script

Hello everyone Im sure this has been asked lots of times before, but after endless searching i cant find what i need. How can i make a bash script unreadable to all, including root, but still executable, im not worried about editing it again etc... , is there a way to convert it or something, i... (5 Replies)
Discussion started by: dave123
5 Replies

4. UNIX for Advanced & Expert Users

Locking issue

Hi everyone, I have got a requirement that, i need to check a specific folder,say /test/lock/ for few specific files, say *lock*, whether it has been locked or not.If any one of it is locked than i need to delete that file after a specific time, say after 10 minutes. I never have worked on... (4 Replies)
Discussion started by: Susant
4 Replies

5. Shell Programming and Scripting

locking mechanism

I have a shell script. How can use some kind of locking mechanism to ensure that the script is not being executed by two people at the same time? (3 Replies)
Discussion started by: tjay83
3 Replies

6. UNIX for Dummies Questions & Answers

how to do file locking?

how to ensure all files are being locked while updateing some files? example when i want to update the password and shadow file in unix. how do i implement file locking?? please advice thanks (2 Replies)
Discussion started by: yang
2 Replies

7. UNIX for Dummies Questions & Answers

file locking

how do i implement file locking in unix? example if i want to update a file, i would like to use file locking. how do i implement it? i am using shell script thanks (3 Replies)
Discussion started by: yang
3 Replies

8. UNIX for Dummies Questions & Answers

Keyboard keeps locking up

First off, let me start by saying that I am a total rookie when it comes to Unix so I will do my best to explain the situation. BACKGROUND:We are running AIX and using a third party Inventory Management software called Acclaim. My main interface terminal is just a "dummy" terminal hooked up to... (1 Reply)
Discussion started by: sstaszak11
1 Replies

9. UNIX for Dummies Questions & Answers

Locking in Unix?

Hi all! I want to know about Mapping Filesystems to Multiprocessor Systems.( lock ...) and Traditional UNIX Locking Primitives. Can you help me? (1 Reply)
Discussion started by: nguoidoius
1 Replies

10. UNIX for Advanced & Expert Users

File Locking

Hi, Does anyone know what happens when two processes are simultaneously trying to write to a single file in UNIX (AIX)? Cheers (1 Reply)
Discussion started by: penfold
1 Replies
Login or Register to Ask a Question
strategy(9E)							Driver Entry Points						      strategy(9E)

NAME
strategy - perform block I/O SYNOPSIS
#include <sys/types.h> #include <sys/buf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int prefixstrategy(struct buf *bp); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is required for block devices. PARAMETERS
bp Pointer to the buf(9S) structure. DESCRIPTION
The strategy() routine is called indirectly (through cb_ops(9S)) by the kernel to read and write blocks of data on the block device. strat- egy() may also be called directly or indirectly to support the raw character interface of a block device (read(9E), write(9E) and ioctl(9E)). The strategy() routine's responsibility is to set up and initiate the transfer. In general, strategy() should not block. It can, however, perform a kmem_cache_alloc(9F) with both the KM_PUSHPAGE and KM_SLEEP flags set, which might block, without causing deadlock in low memory situations. RETURN VALUES
The strategy() function must return 0. On an error condition, it should call bioerror(9f) to set b_flags to the proper error code, and call biodone(9f). Note that a partial transfer is not considered to be an error. SEE ALSO
ioctl(9E), read(9E), write(9E), biodone(9F), bioerror(9F), buf(9S), cb_ops(9S), kmem_cache_alloc(9F) Writing Device Drivers SunOS 5.10 6 Nov 2003 strategy(9E)