lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A30793C.6090208@cn.fujitsu.com>
Date:	Thu, 11 Jun 2009 11:25:48 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Theodore Tso <tytso@....edu>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	"Martin J. Bligh" <mbligh@...igh.org>,
	Christoph Hellwig <hch@...radead.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Huang Ying <ying.huang@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 1/3] ring-buffer: make the buffer a true circular link
 list

Steven Rostedt wrote:
> On Thu, 11 Jun 2009, Lai Jiangshan wrote:
> 
>>> -	list_splice(&pages, head);
>>> +	/*
>>> +	 * The ring buffer page list is a circular list that does not
>>> +	 * start and end with a list head. All page list items point to
>>> +	 * other pages. Remove one of the pages, init its list head,
>>> +	 * and use list splice to move the rest of the pages to it.
>>> +	 */
>>> +	bpage = list_entry(pages.next, struct buffer_page, list);
>>> +	list_del_init(&bpage->list);
>>> +	cpu_buffer->pages = &bpage->list;
>>> +
>>> +	list_splice(&pages, cpu_buffer->pages);
>>> +
>> Is it proper?
>>
>> 	cpu_buffer->pages = pages.next;
>> 	list_del(&pages);
>>
> 
> Not sure what you are asking here?
> 


I'm not sure whether these 4 lines:
	bpage = list_entry(pages.next, struct buffer_page, list);
	list_del_init(&bpage->list);
	cpu_buffer->pages = &bpage->list;

	list_splice(&pages, cpu_buffer->pages);
equal to these 2 lines:
 	cpu_buffer->pages = pages.next;
 	list_del(&pages);

If there are equivalent, I think the second one
are simpler. It may be not a really necessarily cleanup.

What I asked is: if there are equivalent, could you use these two line:
 	cpu_buffer->pages = pages.next;
 	list_del(&pages);

Lai.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ