freebsd-hackers@freebsd.org

2006-03-12 Thread Pranav Peshwe
Hello,
  What is effectively the difference between PICKUP/DROP_GIANT and
mtx_lock/unlock(&Giant)  ? From the macro expansion, i surmise that
PICKUP/DROP_GIANT deals with recursion in Giant locking.Is this correct ? is
this the only difference ? What will happen if i mix the usage of
PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ?
Also,is there any hard and fast rule prescribing which method of taking the
Giant should be used where in the kernel ?

TIA.

Regards,
Pranav

---
To argue with a person who has renounced the use of reason is like
administering medicine to the dead. -- Thomas Paine
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


freebsd-hackers@freebsd.org

2006-03-12 Thread Bernd Walter
On Sun, Mar 12, 2006 at 04:25:07PM +0530, Pranav Peshwe wrote:
> Hello,
>   What is effectively the difference between PICKUP/DROP_GIANT and
> mtx_lock/unlock(&Giant)  ? From the macro expansion, i surmise that
> PICKUP/DROP_GIANT deals with recursion in Giant locking.Is this correct ? is
> this the only difference ? What will happen if i mix the usage of
> PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ?

You can't mix them, because they are used in different situtation.
You call DROP_GIANT and later PICKUP to handle situations where it
is required to drop GIANT for a while.
You call mtx_lock and later unlock to hold GIANT for a while.

-- 
B.Walterhttp://www.bwct.de  http://www.fizon.de
[EMAIL PROTECTED]   [EMAIL PROTECTED][EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


freebsd-hackers@freebsd.org

2006-03-12 Thread prime
Date: Sun, 12 Mar 2006 16:25:07 +0530

> From: "Pranav Peshwe" <[EMAIL PROTECTED]>
> Subject: Doubts about PICKUP_GIANT() and mtx_lock(&Giant).
> To: freebsd-hackers@freebsd.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
>   What is effectively the difference between PICKUP/DROP_GIANT and
> mtx_lock/unlock(&Giant)  ? From the macro expansion, i surmise that
> PICKUP/DROP_GIANT deals with recursion in Giant locking.Is this correct ?
> is
> this the only difference ? What will happen if i mix the usage of
> PICKUP/DROP_GIANT and mtx_lock/unlock(&Giant) ?
> Also,is there any hard and fast rule prescribing which method of taking
> the
> Giant should be used where in the kernel ?
>
> TIA.
>
> Regards,
> Pranav
>
>
> ---
> To argue with a person who has renounced the use of reason is like
> administering medicine to the dead. -- Thomas Paine
>
>In my opinion,DROP_GIANT() guarantees that Giant is *really*
dropped even it is recursively held.Sometimes we have to make sure
that Giant is not held,and mtx_unlock(&Giant) can't give us such
a promise,so you shouldn't use it in such situations.
   Mix the usage of DROP_GIANT() and mtx_unlock(&Giant) is not
a good idea,I think. In fact,if you really do it,even the compiler
 will reject your source code :-).


Regards,
MingyanGuo

--
Three passions, simple but overwhelmingly strong, have governed my life:
the longing for love, the search for knowledge, and unbearable pity for
the suffering of mankind.
 -Bertrand Russell
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: About amd64 dualcore problems with two SATA disks and nforce4

2006-03-12 Thread Daniel Valencia
Hi,

Well... Hopeful with your mailings, I updated the kernel (cvsup) and rebuilt 
it... the problem's still there... detects one SATA disk (ad4) and crashes 
before acknowledging the second (ad6)...

- Daniel


S�ren Schmidt <[EMAIL PROTECTED]> wrote: Daniel Valencia wrote:
> Hi,
> 
> So, what's your last src/ cvsup date/time? is your machine dualcore? if 
> so, are you building using the SMP option?

yep:

CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ (2412.37-MHz 
K8-class CPU)

and yep:

FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1

> mine breaks when in SMP mode... in GENERIC it works, just it doesn't 
> detect the second SATA disk

Well, no problems here with that, the nve interface is something else 
though :)

-S�ren


> - Daniel
> 
> 
> */S�ren Schmidt /* wrote:
> 
> Daniel Valencia wrote:
>  > Hello,
>  >
>  > I started a short thread a few weeks ago, pointing out a problem
> with my dualcore athlon64, when detecting the second SATA disk
> (/dev/ad6)... my chipset is an nForce4... The problem was narrowed
> down to a few commits performed at a particular date and time. My
> questions are: is it safe to update my kernel now? have those
> problems been fixed? is there something I can do to help (like
> testing or so)?
>  >
> For whatever its worth my NF4 board finds all 4 SATA disks perfectly
> both in i386 and amd64 mode:
> 
> atapci0: port
> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe000-0xe00f at device 6.0 on pci0
> ata0: on atapci0
> ata1: on atapci0
> atapci1: port
> 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xcc00-0xcc0f mem
> 0xfe02b000-0xfe02bfff irq 21 at device 7.0 on pci0
> ata2: on atapci1
> ata3: on atapci1
> atapci2: port
> 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xb800-0xb80f mem
> 0xfe02a000-0xfe02afff irq 22 at device 8.0 on pci0
> ata4: on atapci2
> ata5: on atapci2
> ad0: 38166MB at ata0-master UDMA100
> ad1: 78533MB at ata2-master SATA300
> ad2: 78533MB at ata3-master SATA300
> ad3: 70911MB at ata4-master SATA150
> ad4: 70911MB at ata5-master SATA150
> atausb0:
> addr 2> on uhub1
> atausb0: using SCSI over Bulk-Only
> ata6: on atausb0
> acd0: CDRW at ata6-master USB2
> Trying to mount root from ufs:/dev/ad0s1a
> 
> -S�ren
> 
> 
> 
> Yahoo! Mail
> Bring photos to life! New PhotoMail 
>  
> makes sharing a breeze.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"



-
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"