Re: The meaning of acronym of PIO in kernel?

2011-11-04 Thread Leon Woestenberg
Hello,

On Fri, Nov 4, 2011 at 8:58 AM, loody milo...@gmail.com wrote:
 Hi all:
 I found except DMA transfer, there is a mode called PIO.
 Where I can find the document of this and what is full name of it?

Use search engine powers on PIO, for Programmed Input/Output.

It's not Linux specific, it's computer / micro-architecture specific
terminology.

Regards,
-- 
Leon

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to refer to the unamed structure in page struct

2011-11-04 Thread Dave Hylands
Hi Jimmy,

On Fri, Nov 4, 2011 at 8:27 AM, Jimmy Pan dsp...@gmail.com wrote:
 truct page {
        unsigned long flags;            /* Atomic flags, some possibly
                                         * updated asynchronously */
        atomic_t _count;                /* Usage count, see below. */
        union {
                atomic_t _mapcount;     /* Count of ptes mapped in mms,
                                         * to show when page is mapped
                                         *  limit reverse map searches.
                                         */
                struct {                /* SLUB */
                        u16 inuse;
                        u16 objects;
                };
        };
        union {
            struct {
                unsigned long private;          /* Mapping-private opaque data:
                                                 * usually used for 
 buffer_heads
                                                 * if PagePrivate set; used for
                                                 * swp_entry_t if 
 PageSwapCache;
                                                 * indicates order in the buddy
                                                 * system if PG_buddy is set.
                                                 */
                struct address_space *mapping;  /* If low bit clear, points to
                                                 * inode address_space, or 
 NULL.
                                                 * If page mapped as anonymous
                                                 * memory, low bit is set, and
                                                 * it points to anon_vma 
 object:
                                                 * see PAGE_MAPPING_ANON below.
                                                 */
            };
 #if USE_SPLIT_PTLOCKS
            spinlock_t ptl;
 #endif
            struct kmem_cache *slab;    /* SLUB: Pointer to slab */
            struct page *first_page;    /* Compound tail pages */
        };

You just reference the variable as if the unnamed union weren't there
(i.e. just like unnamed unions in C++).

Here's an example from the kernel source tree:
http://lxr.linux.no/linux+v3.1/include/linux/mm.h#L419

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to refer to the unamed structure in page struct

2011-11-04 Thread Jimmy Pan
On Sat, Nov 5, 2011 at 12:00 AM, Dave Hylands dhyla...@gmail.com wrote:
 Hi Jimmy,

 On Fri, Nov 4, 2011 at 8:27 AM, Jimmy Pan dsp...@gmail.com wrote:
 truct page {
        unsigned long flags;            /* Atomic flags, some possibly
                                         * updated asynchronously */
        atomic_t _count;                /* Usage count, see below. */
        union {
                atomic_t _mapcount;     /* Count of ptes mapped in mms,
                                         * to show when page is mapped
                                         *  limit reverse map searches.
                                         */
                struct {                /* SLUB */
                        u16 inuse;
                        u16 objects;
                };
        };
        union {
            struct {
                unsigned long private;          /* Mapping-private opaque 
 data:
                                                 * usually used for 
 buffer_heads
                                                 * if PagePrivate set; used 
 for
                                                 * swp_entry_t if 
 PageSwapCache;
                                                 * indicates order in the 
 buddy
                                                 * system if PG_buddy is set.
                                                 */
                struct address_space *mapping;  /* If low bit clear, points to
                                                 * inode address_space, or 
 NULL.
                                                 * If page mapped as anonymous
                                                 * memory, low bit is set, and
                                                 * it points to anon_vma 
 object:
                                                 * see PAGE_MAPPING_ANON 
 below.
                                                 */
            };
 #if USE_SPLIT_PTLOCKS
            spinlock_t ptl;
 #endif
            struct kmem_cache *slab;    /* SLUB: Pointer to slab */
            struct page *first_page;    /* Compound tail pages */
        };

 You just reference the variable as if the unnamed union weren't there
 (i.e. just like unnamed unions in C++).

 Here's an example from the kernel source tree:
 http://lxr.linux.no/linux+v3.1/include/linux/mm.h#L419

 --
 Dave Hylands
 Shuswap, BC, Canada
 http://www.davehylands.com


Well, I see, but what is the use of the union and structure?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies